To export a database:
1, Windows cmd Open command line
2, CD to the bin directory of the installation directory of MySQL, if the bin directory is added to the environment variable does not need to switch to the bin directory
3. Export database: Mysqldump-u username-P database name > exported file name
For example, enter a command on the command line mysqldump-u root-p person >d:\person.sql (input will let you enter the password into MySQL)
(If you export a single table, enter the table name after the database name)
4, after the completion of the implementation, you will see the D disk has person.sql file
MySQL Command line Import Database
1. Enter mysql:mysql-u user name-P
As I entered the command line: mysql-u root-p (Input the same will let you enter the MySQL password)
2, create a new database, this is an empty database, such as a new target database named person
3, Input: Mysql>use target database name
As I entered the command line: mysql>use person;
4, import file: mysql>source import filename;
As I entered the command line: Mysql>source d:/person.sql;
MySQL Backup and recovery