简体   繁体   中英

mysql Dump does not write complete data into files

我有一个程序,可以在选定的表上使用mysqldump,该实用程序运行良好,但有时转储未完成,即原始db中存在数千行,而转储文件中没有行,有人可以帮忙吗?

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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM