Mysql database backup transfer command

Source: Internet
Author: User


Mysql database backup transfer command backup MySQL database command mysqldump-hhostname-uusername-ppassword databasename> backupfile. the SQL backup MySQL database is in the format of a table with deletion. the MySQL database is in the format of a table with deletion. This allows the backup to overwrite the existing database without the need to manually delete the original database. Www.2cto.com mysqldump -- add-drop-table-uusername-ppassword databasename> backupfile. SQL directly compresses and backs up the MySQL database mysqldump-hhostname-uusername-ppassword databasename | gzip> batch back up a MySQL database table mysqldump-hhostname-uusername-ppassword databasename specific_table1 batch> backupfile. SQL simultaneously backs up multiple MySQL databases mysqldump-hhostname-uusername-ppassword-databases databasename1 databasename2 databasename3> multibackupfile. SQL only backs up the database structure mysqldump-no-data-databases databasename1 databasename2 databasename3> structurebackupfile. SQL
Backup all databases on the server mysqldump-all-databases> allbackupfile. SQL command for restoring MySQL database mysql-hhostname-uusername-ppassword databasename <backupfile. SQL restore compressed MySQL database gunzip <backupfile. SQL .gz | mysql-uusername-ppassword databasename transfers the database to the new server mysqldump-uusername-ppassword databasename | mysql-host = *. *. *. *-C databasename
 

Related Article

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.