mysql backup

usage

#mysqldump [options] db_name [tables]
#mysqldump [options] –databases db_name1 [db_name2 db_name3...]
#mysqldump [options] –all-databases

Example

#mysqldump -u root -p mydatabase > db.sql

Specific table

#mysqldump -u root -p mydatabase -tables customer > db.sql

How to restore database

#mysql -u root -p database < db.sql

If want to restore to specific database

mysql -u root -pMyPassword MyDatabase < db.sql

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

No comments yet.

Leave a comment

(required)

(required)