MySQL Backup and Restore (mysqldump)

Just for my own quick reference

Official Document:

Backup ALL databases, including mysql (i.e. logins):

Backup one database:

Backup multiple database:

Backup one table:

Restore ALL databases, including logins:

(Usually you should FLUSH PRIVILEGES after restore)

Restore one database:

Restore one database as another name:

Restore one database from --all-databases dump:


Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.