How to change max_allowed_packet size

后端 未结 12 1821
星月不相逢
星月不相逢 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:40

    Many of the answerers spotted the issue and already gave the solution.

    I just want to suggest another solution, which is changing the Glogal variable value from within the tool Mysql Workbench. That is ofcourse IF you use Workbench running locally on server (or via SSH connection)

    You just connect to your instance and go on menu:

    Server -> Options File -> Networking -> max_allowed_packed

    You set the desired value and then you need to restart MySql Service.

提交回复
热议问题