Mysqldump can specify the path, if the path is not specified, but only the file name, then the current access to the MySQL command line in the directory, which is the MySQL installation directory
mysqldump--default-character-set=utf8-h127.0.0.1-uroot-pabctrans-p33061 db table1 able2 |gzip > db ' Date +%y%m%d ' . tar.gz
mysqldump--default-character-set=utf8-h127.0.0.1-uroot-pabctrans-p33061 db table1 able2 |gzip > db ' Date +%y%m%d ' . tar.gz
Zcat .... gz | Mysql-h127.0.0.1-uuser-ppass DB
--max_allowed_packet=1024m
Add-f parameter, can ignore the operation is an exception, or an exception will be exited
Tar-tvzf db20121116.tar.gz
Can't see the zipped files inside?
This is not a tar bag.
Zcat dzhweibotmp120121116.tar.gz | More enter to see the next part, Q key exit
--add-drop-table=false
Mysqldump--help|grep Drop
--add-drop-database add a drop database before each create.
--add-drop-table Add a drop table before each create.
Options--skip-add-drop-table--skip-add-locks
--opt same as--add-drop-table,--add-locks,--create-options,
--skip-opt Disable--opt. Disables--add-drop-table,--add-locks,
Add-drop-database FALSE
Add-drop-table TRUE
This is some help by default is to turn on delete
SQL command is the first drop, after the establishment of the table structure, for the table with data to do import operations, it is very dangerous! Be sure to pay attention!
Good
--no-create-info
Adding this will not delete and CREATE TABLE statements.
--add-drop-table=false
This parameter simply does not have a delete table statement, but there is a basic usage of creating a table statement cnblogs-mysqldump backup Restore and mysqldump Import Export statement cnblogs-mysql mysqldump tool
Mysqldump Import and export detailed