General form: mysqldump-h ip-u user name-p database name > exported file name
(1)-P can not add password, can only be entered as 1 in the same way (2) mysqldump is under the cmd command, no longer MySQL under, that is, can not enter the MySQL (that is, use dpname under, you have to exit MySQL under the exit can be.) )
One: Export of database (backup)
0: (Backing up the database is exporting all the tables and the data does not add-D)
Mysqldump-h localhost-u root-p Test > G:\arcgisworkspace\zypdoc\test.sql
Mysqldump-h 10.180.6.183-u root-p dmsdev > D:\imssdb\20170930\dmsdev20170930.sql
Mysqldump-h 10.180.6.183-u root-p newfwk > D:\imssdb\20170930\newfwk20170930.sql
Mysqldump-h 10.180.6.183-u root-p dcsdev > D:\imssdb\20170930\dcsdev20170930.sql
II: Database import (Restore)
0: Import the database (first to create data, then import) C:\Program files\mysql\mysql Server 5.5\bin>
Mysql-h localhost-u root-p (enter MySQL below)
CREATE DATABASE ABC;
show databases; (You can see all the databases that already exist, and the database ABC you just created)
Use ABC; (enter the ABC database below)
Show tables; (see all the tables below the ABC database, empty)
SOURCE G:\arcgisworkspace\zypdoc\test.sql (Import database table)
Show tables (see all tables below the ABC database to see the table)
desc pollution; (view table structure design)
SELECT * from pollution;
Exit (or CTRL + C) quit MySQL
Summary of MySQL database import and Export method