Run the following command in the DOS MySQL installation directory/bin directory:
Mysql-u username-P databasename use database_name
Run the following command:
Mysql> source 111. SQL
The default 111. SQL path must be placed in the bin of MySQL.
Import successful !!!~~ Yeah ..
1. Export the entire database
Mysqldump-u username-P Database Name> exported file name
Mysqldump-u wcnc-P smgp_rj_wcnc> wcnc. SQL
2. Export a table
Mysqldump-u user name-P database name Table Name> exported file name
Mysqldump-u wcnc-P smgp_rj_wcnc users> wcnc_users. SQL
3. Export 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 table before each create statement.
4. Import the database
Common source commands
Go to the MySQL Database Console,
For example, MySQL-u root-P
Mysql> Use Database
Then run the source command. The following parameter is the script file (for example,. SQL used here)
Mysql> source D: \ wcnc_db. SQL