Mysqldump How do I back up some databases? For a database?

Source: Internet
Author: User

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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.