I have root access to all my mysql databases. how can i export/import all the databases at once?
I have 开发者_如何学运维root access to all my mysql databases. how can i export/import all the databases at once?
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.
精彩评论