Plesk

How to change the max_user_connections value in MySQL/MariaDB on a Plesk server

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Question

How to adjust the max_user_connections value in MySQL/MariaDB on a Plesk server?

Answer

 

For Plesk on Linux

 

  1. Connect to a Plesk server via SSH.

  2. Open the my.cnf file in a text editor. In this example we are using the vi editor:

    • on CentOS/RHEL-based distributions

      # vi /etc/my.cnf

    • on Debian/Ubuntu-based distributions

      # vi /etc/mysql/my.cnf

  3. Add the following line under the [MySQLD] section:

    # grep max_user_connections /etc/my.cnf
    max_user_connections = 100

  4. Save the changes and close the file.

  5. Restart the MySQL/MariaDB service to apply the changes:

    # systemctl restart mysql

    # systemctl restart mariadb

 

For Plesk on Windows Server

 

  1. Connect to a Plesk server via RDP.

  2. Open the file %plesk_dir%DatabasesMySQLmy.ini in a text editor (just paste this path in Windows Explorer to open).

  3. Increase the value of max_user_connections:

    Note: If max_user_connections does not exist, add this line under the [MySQLD] section.

    max_user_connections = 100

  4. Save the changes and close the file.

  5. Open Plesk Services Monitor in Windows Start > All Programs > Plesk.

  6. Select MySQL56 or MariaDB103 under the SQL Server section and click Restart to apply the chnages.