美文网首页
2006, "MySQL server has gone awa

2006, "MySQL server has gone awa

作者: 又老又胖 | 来源:发表于2022-04-15 19:00 被阅读0次

Jupyter开发时通过panda DF insert Mysql时会有类似下面的报错信息。

 OperationalError: (pymysql.err.OperationalError) (2006, "MySQL server has gone away (BrokenPipeError(32, 'Broken pipe'))")

也许是因为max_allowed_packet值过小导致的,可以通过以下命令进行修改。

>show VARIABLES like '%max_allowed_packet%';

>set global max_allowed_packet = 1024*1024*32;

相关文章

网友评论

      本文标题:2006, "MySQL server has gone awa

      本文链接:https://www.haomeiwen.com/subject/xfeqertx.html