How to set max_allowed_packet size for MySQL?

Created:

2016-11-16 13:23:52 UTC

Modified:

2017-04-27 15:38:25 UTC

3

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.5 for Linux
  • Plesk 12.0 for Windows
  • Plesk 12.0 for Linux
  • Plesk 12.5 for Windows
  • Plesk 9.x and below 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. Set the max_allowed_packet value in /etc/my.cnf file:

    vi /etc/my.cnf
    ---
    ....
    [mysqld]
    max_allowed_packet=16M
    ....
    ---
  2. Restart MySQL service:

    # /etc/init.d/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.

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