Question
How to set the value of max_allowed_packet
or wait_timeout
for MySQL service (which serves client databases)?
Answer
Follow the steps below to achieve the same:
For Linux:
- Connect to Plesk server via SSH
-
Set the max_allowed_packet or wait_timeout value in
and
[mysqld]
sections of
[mysqldump]
file.
my.cnf-
For Debian/Ubuntu:
/etc/mysql/my.cnf
-
For CentOS/RHEL/CloudLinux:
/etc/my.cnf
[mysqld]
wait_timeout = 31536000
max_allowed_packet=32M
....
[mysqldump]
max_allowed_packet=32M -
For Debian/Ubuntu:
-
Restart MySQL service:
# service mysql restart || service mariadb restart || service mysqld restartÂ
Â
For Windows:
- Connect to Plesk server via RDP
-
Set the max_allowed_packet or wait_timeout value in
and
[mysqld]
sections of
[mysqldump]
%plesk_dir%DatabasesMySQLmy.ini
 file.[mysqld]
wait_timeout = 31536000
max_allowed_packet=32M
....
[mysqldump]
max_allowed_packet=32MNote: wait_timeout=31536000 is the maximum supported value in MySQL server.
- After saving the file, restart MySQL process via Plesk Services Monitor (it can be found in system tray):