I want to import a couple of huge .sql dumps (~600G each) into a mysql server 5.5 running on an Ubuntu 14.04.

The machine has about 8G of RAM allocated to it;

The previous machine had 128G;

Storage space considerations aside, what else should I take into account before performing the mysql import command?

  • Why start on such and old OS/MySQL version? – danblack Sep 17 '18 at 10:41
  • also read this entry – danblack Sep 17 '18 at 10:43
  • My previous (legacy) db is on 5.5 and I want to maintain the same version for the time being – pkaramol Sep 17 '18 at 10:51
  • InnoDB or MyISAM or both? – Rick James Oct 7 '18 at 16:44
  • Just InnoDB ... – pkaramol Oct 7 '18 at 17:07

If your database tables have them, it's always best to drop indices and recreate them after the import. Also, disable foreign keys temporarily by executing SET FOREIGN_KEY_CHECKS=0; (and SET FOREIGN_KEY_CHECKS=1; afterwards). This will speed up your import (though by how much is hard to tell).

  • Check the .sql files; those steps may be built in. – Rick James Oct 7 '18 at 16:44

For large-scale backup and restore, a physical backup is more appropriate, to copy the data files in their original format that can be restored quickly, and recommends the MySQL Enterprise mysqlbackup utility. -- http://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#mysqldump-performance

Find Detailed Answer here: https://forums.mysql.com/read.php?24,645437,645443#msg-645443

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.