开发者

mysql Dump does not write complete data into files

开发者_如何学GoI have a program in which I use mysqldump on selected tables, the utility runs fine but at times the dump is not complete, i.e there are thousands of rows that exist in the original db and not in the dump file, can anyone help ?


I use a database that is hundreds of thousands of records, with stored procedures and triggers, here is the mysqldump command I use for automated backups (obviously, replace the quoted values, including quotes, with your own settings):

"$MYSQL_DIR"mysqldump --no-defaults --user="$MYSQL_SERVER_USER" --password="$MYSQL_SERVER_PASSWORD" --host="$MYSQL_HOST" --skip-opt --add-locks --create-options --disable-keys --extended-insert --single-transaction --skip-master-data --quick --set-charset --flush-privileges --quote-names --triggers --routines --comments --databases --default-character-set="$DB_CHARSET" --max_allowed_packet=16M "$DB_NAME" --result-file="$DB_TO_BACKUP_PATH_TEMP" 2> "$LOG_ERROR_PATH"

Hopefully seeing what I did will help, there may be an option switch you need that you have not included...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜