Enter the command under CMD mysql-uroot-penter password:***** First import the library to exist and then use the following command Mysql>source D:demo.sql//import successful import!!! ~~yeah. 1. Export the entire database mysqldump-u user name-p database name > exported file name mysqldump-u wcnc-p smgp_apps_wcnc > wcnc.sql2. Export a table mysqldump-u users Name-P database name Table name > exported file name mysqldump-u wcnc-p smgp_apps_wcnc users> wcnc_users.sql3. Exporting a database structure mysqldump-u wcnc-p-D --add-drop-table SMGP_APPS_WCNC >d:\wcnc_db.sql-d No data--add-drop-table add a drop table4 before each create statement. Import the database The common source command enters the MySQL database console, such as the Mysql-u root-p mysql>use database and then uses the source command, followed by the script file (for example, the. SQL used here) Mysql>source d:\w Cnc_db.sql
MySQL import. sql file