How to change max_allowed_packet size

后端 未结 12 1580
星月不相逢
星月不相逢 2020-11-22 09:16

I am having a problem with BLOB fields in my MySQL database - when uploading files larger than approx 1MB I get an error Packets larger than max_allowed_packet are not

12条回答
  •  情深已故
    2020-11-22 09:43

    If getting this error while performing a backup, max_allowed_packet can be set in the my.cnf particularly for mysqldump.

    [mysqldump]
    max_allowed_packet=512M
    

    I kept getting this error while performing a mysqldump and I did not understand because I had this set in my.cnf under the [mysqld] section. Once I figured out I could set it for [mysqldump] and I set the value, my backups completed without issue.

提交回复
热议问题