Procedure for backing up a database using mysqldump _ MySQL

Source: Internet
Author: User
What does dump backup mean? DUMP means the result of "computer" directly transferring the internal storage data. While mysqlDUMP backup is usually a comprehensive backup method in addition to the data itself, it also backs up the relevant underlying programs at the same time. 1. mys mysqldump

What does dump backup mean? DUMP means the result of "computer" directly transferring the internal storage data. While mysqlDUMP backup is usually a comprehensive backup method in addition to the data itself, it also backs up the relevant underlying programs at the same time.

1. mysqldump backup:
Create a new blank table = clear table = initialization note case sensitivity: mysql> show databases; // The command words are generally uppercase!
1 = backup database structure = C: \ Documents Ents and Settings \ user> mysqldump-u root-proot-d -- opt new_db> c: \ 3456. SQL // empty table without data
2 = enter MySql = C: \ Documents Ents and Settings \ user> mysql-u root-proot
3 = delete DATABASE = mysql> drop database new_db;
4 = CREATE a DATABASE = mysql> create database new_db;
5 = use Database = mysql> use new_db
6 = import SQL file = mysql> source c: \ 3456. SQL

II. data recovery:
1 = backup database and data = C: \ Documents Ents and Settings \ user> mysqldump-u root-proot -- opt new_db> c: \ an. SQL // do not wait for a semicolon
2 = enter MySql = C: \ Documents Ents and Settings \ user> mysql-u root-proot
// Mysql> show databases;
3 = delete database = mysql> drop database new_db;
4 = create a database = mysql> create database new_db;
5 = use Database = mysql> use new_db
6 = import SQL file = mysql> source c: \ 3456. SQL

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.