MySQL Backup and Restore (mysqldump)

Just for my own quick reference

Official Document: https://mariadb.com/kb/en/mariadb/mysqldump/

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.