MySQL: Difference between revisions

513 bytes added ,  25 August 2016
Line 56: Line 56:
$ mysql -u root -p < ~/files/dbs.sql
$ mysql -u root -p < ~/files/dbs.sql
</syntaxhighlight>
</syntaxhighlight>
IMPORTANT: If your file is large, or you just have a lot of records, you may want to make sure you have something bigger than 16M for max_allowed_packet attribute in your my.cnf (usually found under /etc/mysql/ or /etc/mysql/mysql.conf.d/) on your new server where you're doing the import, else the server could hang on a large insert operation and your MySQL server may actually decide to go away, literally.  On one of the servers I had it for 1024M just for this operation and brought it back low afterwards.


[[Category:System administration]]
[[Category:System administration]]