Focus on cloud service provider activities
Notes on website operation and maintenance

Example demonstrates MySQL backup command of Linux server

In the server, we use more MySQL databases. To ensure the security of data, we need to back up the database irregularly. Here we briefly review how to back up the MySQL database, and we need to use these common commands.

Back up the entire database:

 Mysqldump - u [user name] - p [database name]>[file name]. sql

For example, if you want to back up a database named "test" and save it to a file named "test_backup. sql", run the following command:

 mysqldump -u root -p test > test_backup.sql

Back up specific tables:

 Mysqldump - u [user name] - p [database name] [table name]>[file name]. sql

For example, if you want to back up a table named "users" in a database named "test" and save it to a file named "users_backup. sql", run the following command:

 mysqldump -u root -p test users > users_backup.sql

Here we try to back up the database with commands, which is more complete. If you use phpMyadmin to back up the database, it is easy to be incomplete.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Example demonstrates MySQL backup command of Linux server


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge