MySQL Backup restore command summary under win

Source: Internet
Author: User
Suppose MySQL is installed in C: disk, MySQL database username is root, password is 123456, database name is database_name, in D: the root of the directory to store backup database, Backup database name is Backup20070713.sql (20070713.sql is backup date)

Back up the database:

mysqldump-uroot-p123456 database_name "D:/backup20070713.sql

To recover a database:

Delete the original database, set up a database, and import the backup database.

mysqladmin-uroot-p123456 drop database_name

MYSQLADMIN-UROOT-P123456 Create database_name

mysql-uroot-p123456 database_name

Note: Before you import a backup database, database_name if not, you need to create it, and you can import it as a database name in Backup20070713.sql.

Note: Environment Windows command line



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.