0

I backup mysql data with mysqldump command:

mysqldump -uroot -pbuild testDB > ./testDB.sql

And restore it from the testDB.sql file with command:

source testDB.sql

The testDB.sql file is 1.8GB, and restore it in my local computer(Mac pro os10.10 2.6 GHz Intel Core i5,8 GB 1600 MHz DDR3) took around 7minutes,but on my colleagues's(8GB) window computer, it will took more than one hour.

Any idea can help me? It is InnoDB and I also try some ways like:

set autocommit=0;
set unique_checks=0;
set foreign_key_checks=0;

source testDB.sql

and at the end:

set unique_checks=1;
set foreign_key_checks=1;
commit;

But it seems not to be better.

And I also find some tools: xtrabackup, mydumper/myloader. I try mydumper ,but failed now, it seems to be complicated on mac os.

I hope any one could explian more on what is the bottleneck of mysqldump and restore mysql data. set

Phate01
  • 2,499
  • 2
  • 30
  • 55
fcbflying
  • 57
  • 5

0 Answers0