How to set max_allowed_packet size for MySQL

Created:

2016-11-16 13:23:52 UTC

Modified:

2017-08-16 16:16:56 UTC

9

Was this article helpful?


Have more questions?

Submit a request

How to set max_allowed_packet size for MySQL

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Windows
  • Plesk 12.0 for Linux
  • Plesk 12.5 for Windows
  • Plesk 9.x for Linux

Symptoms

How to set max_allowed_packet size to 16 MB for MySQL?

Resolution

Follow the steps below to achieve the same:

  1. Connect to the server using SSH/RDP.
  2. Set the max_allowed_packet value in [mysqld] and [mysqldump] sections of my.cnf file:

    CONFIG_TEXT: [mysqld]
    max_allowed_packet=16M
    ....
    [mysqldump]
    max_allowed_packet=16M

  3. Restart MySQL service:

    # service mysqld restart
    mysql start/running, process 2496

Plesk for Windows :

Correct the same value in %plesk_dir%\\Plesk\\Databases\\MySQL\\Data\\my.ini and restart MySQL process Plesk Services Monitor:

serv.png

Have more questions? Submit a request
Please sign in to leave a comment.