--single-transaction mysqldump, don't lock the table
–NO-DATA Backup Structure only
Back up a MySQL database (some) table
Mysqldump-hhostname-uusername-ppassword databasename specific_table1 specific_table2 > Backupfile.sql
Mysql>use Database
Then use the source command, followed by the script file (for example, the. SQL used here)
Mysql>source D:/wcnc_db.sql
Back up all databases on the server
Mysqldump–all-databases > Allbackupfile.sql
#导出某个数据库-structure + data
Shell>mysqldump-h192.168.161.124-uroot-pxxxxxx--opt db_name |gzip-9 >/db_bakup/db_name.gz
#导出某个数据库的表-structure + data + functions + stored procedures
Shell>mysqldump-h192.168.161.124-uroot-pxxxxxx--opt-r db_name |gzip-9 >/db_backup/db_name.gz
# Export the structure of a table for a database
Shell>mysqldump-h192.168.161.124-uroot-pxxxxxx--opt--no-data db_name tal_name | gzip-9 >/db_bak/db_name.tal_name.struct.gz
#导出某个数据库的某张表的数据
Shell>mysqldump-h192.168.161.124-uroot-pxxxxxx--opt--no-create-info db_name tbl_name | gzip-9 >/db_bak/db_name.tbl_name.data.gz
##--opt==--add-drop-table +--add-locks +--create-options +--disables-keys +--extended-insert +--lock-tables +--quick +--set+charset
# #默认使用--opt,--skip-opt Disable--opt parameter
Some of MySQL's notes