If you load the contents of the entire database Meet_A_Geek to a file, you can use the following command:
Bin/mysqldump-p Meet_A_Geek> MeetAGeek_Dump_File.txt
This statement also allows you to specify a table for dump (backup/export/load ?). If you want to export the entire content of the table Orders in the database Meet_A_Geek to a file, run the following command:
Bin/mysqldump-p Meet_A_Geek Orders> MeetAGeek_Orders.txt
This is very flexible. You can even use the WHERE clause to select the records you need to export to the file. To achieve this purpose, you can use a command similar to the following:
Bin/mysqldump-p-where = "Order_ID> 2000" Meet_A_Geek Orders> Special_Dump.txt
This article from: (www.91linux.com) detailed source reference: http://www.91linux.com/html/article/database/mysql/20080109/9516.html
______________________________________________________________________________________________
1. Import and Export
1. mysql exports the entire database
Mysqldump-u username-p Password Database Name> exported file name
Mysqldump-u wcnc-p111111 smgp_rj_wcnc> wcnc. SQL
2. mysql exports a database 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. MySQL exports a database structure
Mysqldump-u wcnc-p-d -- add-drop-Table smgp_apps_wcnc> D: wcnc_db. SQL
-D no data -- add-drop-table adds a drop table before each create statement.
4. Import MySQL 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
2. Set the session character set encoding
Set names UTF-8;
----------------------------------
Example of backing up a MySQL database (which can be regularly executed as a bat file ):
Cd "C: \ Program Files \ mysql server5.1 \ bin"
Mysqldump-uroot-p123456 test> test_backup. SQL
Echo "pause, press any key to exit"
Pause