Data Backup and Recovery memo

Source: Internet
Author: User

1. Mysqldump BACKUP Database

First go to the command prompt environment and go to the directory where Mysqldump.exe is located (C:\Program files\mysql\mysql Server 5.7\bin).

Format

>mysqldump-u user-p dbname > Abc.sql (All tables in the backup library)

Eg: >mysqldump-u root-p test_db > C:/DbBackup/test_db.sql (note '/' direction)

2. Restore the database

>mysql-u user-p [dbname] < Filename.sql

Eg: >mysql-u uid_test-p uid_develop < C:/dbbackup/test_db.sql

3,mysqldump back up one or more tables:

> Mysqldump-u user-p [dbname] [table1 table2 table3] > Test.sql

If you back up multiple tables, the table names are separated by spaces

4. Backing up multiple libraries (--database)

> mysqldump-u user-h host-p--databases [dbname1 dbname2 dbname3 ...] > filename.sql

Use the--all-databases parameter to back up all databases on the system

> mysqldump-u user-h host-p--all-databases > Filename.sql

Data Backup and Recovery memo

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.