How do I modify the max_allowed_packet parameter of the mysql database

  • 2020-05-27 07:23:03
  • OfStack

Errors such as "Got a packet bigger than allowed_packet 'bytes" or "MySQL server has gone away" occur when importing the database, usually due to the fact that the current imported data is larger than the maximum package size of the system. The server's default max_allowed_packet value is 1MB, which can be fixed by changing the size of the 'max_allowed_packet' parameter.

To modify it, go to the mysql installation directory, find the my.ini file, and add max_allowed_packet=*M (you can set it as you like) at the bottom.


Related articles: