Http://c.biancheng.net/cpp/html/1458.html
The mysqldump command is used to back up the database.
The mysqldump command executes under the DOS [Url=file://\\mysql\\bin]\\mysql\\bin[/url] directory.
1) Export the entire database (the export file is present in the Mysql\bin directory by default)
?? mysqldump-u user name-p database name > exported file name
??? Mysqldump-u user_name-p123456 database_name > Outfile_name.sql
2) export a table
??? mysqldump-u user name-P database name Table name > exported file name
??? mysqldump-u user_name-p database_name table_name > OUTFILE_NAME.SQL
3) Export a database structure
??? Mysqldump-u user_name-p-d–add-drop-table database_name > Outfile_name.sql
???-D No data –add-drop-table add a drop table before each create statement
4) Export with language parameters
??? mysqldump-uroot-p–default-character-set=latin1–set-charset=gbk–skip-opt database_name > Outfile_ Name.sql
For example, back up the AAA library to file back_aaa:
[email protected] root]# Cd/home/data/mysql
[email protected] mysql]# mysqldump-u root-p--opt aaa > Back_aaa
MySQL command mysqldump: Backing up the database