小编给大家分享一下MySQL5.7中mysqldump:查询Error 2013备份报错怎么办,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧!描述生产环境使用MySQL5.7.19之前每天正常的备份突然报错,后台日志报错信息如下:2018-11-01T20:33:05.754602Z 57223 [Note] Aborted connection 57223 to db: ‘***’ user: ‘root’ host: ‘localhost’ (Got timeout writing communication packets)2018-11-02T20:32:02.062349Z 57512 [Note] Aborted connection 57512 to db: ‘***’ user: ‘root’ host: ‘localhost’ (Got timeout writing communication packets)2018-11-03T17:02:17.276883Z 57759 [Note] Aborted connection 57759 to db: ‘***’ user: ‘root’ host: ‘localhost’ (Got timeout writing communication packets)2018-11-03T20:33:42.574751Z 57802 [Note] Aborted connection 57802 to db: ‘***’ user: ‘root’ host: ‘localhost’ (Got timeout writing communication packets)2018-11-04T08:57:33.911527Z 57952 [Warning] IP address ‘***.****.***.***’ could not be resolved: Name or service not known2018-11-04T20:32:41.571757Z 58092 [Note] Aborted connection 58092 to d免费主机域名b: ‘***’ user: ‘root’ host: ‘localhost’ (Got timeout writing communication packets)2018-11-05T00:52:24.345151Z 58144 [Note] Aborted connection 58144 to db: ‘免费主机域名***’ user: ‘root’ host: ‘localhost’ (Got timeout writing communication packets)解决思路一开始认为是包最大值太小,即调大max_allowed_packet参数,将参数调大到200M之后再进行备份发现备份依然报错查看报错信息:mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `***` at row: 325118与后台日志信息:2018-11-05T01:12:30.211358Z 58154 [Note] Aborted connection 58154 to db: ‘***’ user: ‘root’ host: ‘localhost’ (Got timeout writing communication packets)查看’timeout’参数信息:调大这两个参数:再执行备份脚本,报错信息消失,备份正常!
看完了这篇文章,相信你对“MySQL5.7中mysqldump:查询Error 2013备份报错怎么办”有了一定的了解,如果想了解更多相关知识,欢迎关注云技术行业资讯频道,感谢各位的阅读!
这篇文章主要讲解了“怎么修改MySQL的SQL_MODE”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么修改MySQL的SQL_MODE”吧!mysql> select @@sql_mode;+—-…