Tuesday, September 08, 2015

export all mysql user databases at one go

/mnt/ssdata/mysql5.5_bak# time mysqldump --lock-all-tables -u root -p --all-databases > mysql5.5_dump.sql
Enter password:
-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.

real    1m50.291s
user    0m52.281s
sys     0m5.228s


There is warning message above,  so

/mnt/ssdata/mysql5.5_bak# time mysqldump --events --ignore-table=mysql.events --lock-all-tables -u root -p --all-databases > mysql5.5_dump2.sql
Enter password:

real    1m45.663s
user    1m4.349s
sys     0m5.483s