tags:

views:

21

answers:

1

I have root access to all my mysql databases. how can i export/import all the databases at once?

+1  A: 

mysqldump can do it.

mysqldump --all-databases >backupfile

to import

mysql < backupfile

You could also shut down the server and copy/tar/rsync the mysql data directory but the restore for this is potentially tricky and I would not suggest it.

Craig