Fix Mysql Error: Packets larger than max_allowed_packet are not allowed

Discussion in 'Code' started by securityhope, Apr 9, 2017.

  1. securityhope

    securityhope Administrator Staff Member

    Joined:
    Aug 3, 2016
    Messages:
    1,241
    Likes Received:
    0
    Trophy Points:
    36
    Fix Mysql Error Packets larger than max_allowed_packet are not allowed.Void SendPacket(MySql.Data.MySqlClient.MySqlPacket)

    When a MySQL client or the mysqld server receives a packet bigger than max_allowed_packet bytes, it issues an ER_NET_PACKET_TOO_LARGE error and closes the connection. With some clients, you may also get a Lost connection to MySQL server during query error if the communication packet is too large.

    Both the client and the server have their own max_allowed_packet variable, so if you want to handle big packets, you must increase this variable both in the client and in the server.

    How To Fix It?

    MySQL a system parameter: max_allowed_packet which defaults to 1048576 (1M),
    Query: show VARIABLES like '% max_allowed_pa cket%';

    Modify the value of this variable: MySQL installation directory under the my.ini file in the [mysqld] section of the "max_allowed_pa cket = 1M", such as the change to 4M (if there is no line of content, add a line),

    save, MySQL service can now load more than 1M files.

    upload_2017-4-9_13-28-6.png
     

Share This Page

Share