Requirements Description :
A few databases in the MySQL server are backed up by the mysqldump tool.
Or, you can back up one of the databases.
Operation Process :
1. Back up with the name of the database appended to the--databases parameter
[Email protected] mysqldb_backup]$ mysqldump-uroot-p--single-transaction--master-data--flush-logs--databases top_server test01> backup_2018-Geneva- the. Sqlenter password: [[email protected] mysqldb_backup]$ls-Ltrtotal2111792-rw-rw-r--1MySQL MySQL2137635937Apr8 the: $full-backup_on_2018-Geneva- ,. SQL-rw-rw-r--1MySQL MySQL24832086Apr9 One: -backup_2018-Geneva- the. sql#备份生成的SQL格式的dump文件
Note : Use the--databases option, followed by multiple databases, separated by a space between each database. You cannot use commas.
If separated by commas, the following error is reported:
[Email protected] mysqldb_backup]$ mysqldump-uroot-p--single-transaction--master-data--flush-logs--databases top_ server,test01 > backup_2018--1049'top_server,test01 ' when selecting the database
Note: If multiple databases are separated by commas, they are treated as a database name.
2. For one, make a separate backup of a database,--databases followed by a database
--databases top_server> backup_2018--Geneva
Alternatively, omit the--databases option
top_server> backup_2018--sqlenter Password:
Note: for a database, this is a top_server database backup, you can omit the--databases option. All can achieve the purpose of database backup.
Document creation Time: April 9, 2018 11:30:38
Mysqldump How do I back up some databases? For a database?