User Tools

Site Tools


mirnshi:speed_up_mysql_import

speed up mysql import

Generally, it is very slow to restore the data from mysqldump file. Here is a tip to speed up this work:

  % mysql -u someuser -p
  > SET AUTOCOMMIT=0;
  > SET UNIQUE_CHECKS=0;
  > SET FOREIGN_KEY_CHECKS=0;
  > source dump.sql;
  > SET FOREIGN_KEY_CHECKS=1;
  > UNIQUE_CHECKS=1;
  > COMMIT;

Discussion

, dwBOUhMLnhELBtF, 2012/01/08 03:14

For the love of God, keep writing these aricetls.

Enter your comment. Wiki syntax is allowed:
 
mirnshi/speed_up_mysql_import.txt · Last modified: 2009/12/17 16:12 by mirnshi