合 mysqldump导出报错"mysqldump: Error 2013 ... during query when dumping table
Tags: MySQL
mysqldump导出报错:
1 2 3 | [root@lhrcentos76 mysql]# mysqldump --databases xxxx_hotel --single-transaction --hex-blob --set-gtid-purged=OFF --no-create-info --skip-triggers -uroot -pxxx -h119.3.xxx.xxx -P3306 -r xxxxx_hotel_data.sql mysqldump: [Warning] Using a password on the command line interface can be insecure. mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `sys_log` at row: 112614 |
解决:
1 2 3 4 | ---修改 set global wait_timeout=28800000; set global net_read_timeout=28800; set global net_write_timeout=28800; |
导出语句参考: https://support.huaweicloud.com/usermanual-rds/rds_migration_mysql.html
在mysqldump备份导出的时候类似用如下语句导出数据
mysqldump -uroot -p'passwd' --opt --default-character-set=utf8 --triggers -R --hex-blob --single-transaction --no-autocommit --master-data=2 test_game mail >mail.sql
出现类似如下报错: