Mysql uses mysqldump for database backup _ MySQL

Source: Internet
Author: User
Mysql uses mysqldump for database backup mysqldump

BitsCN.com

System environment: win7, mysql5.5

There are two main types of mysql data backup:

(1) text format backup: msqldump program

(2) binary backup: mysqlhotcopy, cp, tar, etc.

I mainly use mysqldump to perform a test on the local machine:

1. back up the database

(1) open cmd

(2) cd to the bin directory of the mysql installation directory

(3) input: mysqldump-u root-p crashcourse> d:/crashcourse-backup-2013-11-28. SQL (root is the meaning of the user name)

(4) enter the password

(5) complete the backup

2. restore the database

(1) use the msql command Line Client to connect to the database

(2) create a database

Input: create database crashcourse2

(3) Select a database

Input: use database crashcourse2

(4) restoration

Input: source d:/crashcourse-backup-2013-11-28. SQL

BitsCN.com

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.