开发者

How do I set max_allowed_packet or equivalent for MySQLdb in python?

开发者 https://www.devze.com 2023-01-22 18:09 出处:网络
It seems as if MySQLdb is restricting the maximum transfer size for SQL statements. I have set the max_allowed_packet to 128M for mysqld. MySQL documentation says 开发者_运维技巧that this needs to be

It seems as if MySQLdb is restricting the maximum transfer size for SQL statements. I have set the max_allowed_packet to 128M for mysqld. MySQL documentation says 开发者_运维技巧that this needs to be done for the client as well.


You need to put max_allowed_packet into the [client] section of my.cnf on the machine where the client runs. If you want to, you can specify a different file or group in mysqldb.connect.

0

精彩评论

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