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