1.mysqldump.exe in the bin directory of the MySQL installation directory
2. Use the Windwos command to enter the bin directory of the MySQL installation directory.
3. Use the mysqldump command to export the. sql file (1) to export the data for the entire database mysqldump-u username-P database name > storage location + exported file name (2) Export data for a table mysqldump-u user name-P database Name table name > Storage location + exported file name (3) Export the structure of a table mysqldump-d-u user name-P database Name table name > storage location + exported file name (4) The structure of the exported database mysqldump-u user name Wcnc-p-d--add-dro P-table smgp_apps_wcnc> Storage location + exported file name-D No data--add-drop-table add a drop table (5) to the data from the remote export database before each CREATE statement mysqldump-h Ip-u Username-P Database name > location + exported file name 4. Exporting data from an entire database
The exported data file is under the E-disk with the name Data.sql
(5) Export data from a table
The exported data file is under the E disk, with the name Data2.sql import data.sql file (1) into the MySQL installation directory of the bin directory (2) login (Mysql-u root-p) (3) authentication password (******) (4) reference to the target database to be imported (use temp_test_db) database temp_test_db database must exist. (5) The Import command source data file directory (source E:\data.sql) takes a certain amount of time, and the import file size is related.
To view the tables in the database temp_test_db
Above
import/export. sql files using the mysqldump command under Windows