———
|
mysqldump - extended optionsmysqldump command dumps databases/tables to standart output. You can use pipe redirect to save it to file: mysqldump [options] >dump.sql When you dump a database there are some options of mysqladmin you need to understand:
How to dump a table(s): mysqldump <db_name> <table1> <table2> ... How to dump a database: mysqldump <db_name> How to dump a more than one database: mysqldump --databases <db_name1> <db_name2> ... How to dump all databases: mysqldump --all-databases
Here is good set of options. file dumpdb #!/bin/bash # # --compatible=mysql323 # # --compatible=mysql40 # # --compatible=mysql323 # prev_dir=$PWD md=/usr/local/mysql/bin/mysqldump $md $* -pn1cks0ft \ --extended-insert \ --skip-comments \ --disable-keys \ --add-drop-table \ --routines \ --quote-names #--skip-extended-insert |