Question
How to increase the MySQL/MariaDB max_connections
value?
Answer
-
Connect to a Plesk server via SSH
-
Open the file
in a text editor. In this example, we are using the vi editor:
my.cnf-
on CentOS/RHEL-based distributions
# vi /etc/my.cnf
-
on Debian/Ubuntu-based distributions
# vi /etc/mysql/my.cnf
-
-
Add the
max_connections
parameter with a required value under the
section:
[mysqld]max_connections=150
-
Save the changes and close the file.
-
Restart the MySQL/MariaDB service:
# systemctl restart mysql
# systemctl restart mariadb
-
Connect to a Plesk server via RDP
-
Open the
file in a text editor.
%plesk_dir%DatabasesMySQLmy.ini -
Add the
max_connections
parameter with a required value under the
section:
[mysqld]max_connections=150
- Save the changes and close the file.
-
Restart the MySQL/MariaDB XX service via Plesk Services Monitor to apply changes: