Articles in this section

How to increase the MySQL/MariaDB max_connections value?

Plesk for Windows kb: how-to Plesk for Linux ABT: Group A

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Question

How to increase the MySQL/MariaDB max_connections value?

Answer

 

For Linux

 

  1. Connect to a Plesk server via SSH

  2. Open the file my.cnf 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 max_connections parameter with a required value under the [mysqld] section:

    CONFIG_TEXT: max_connections=150

  4. Save the changes and close the file.

  5. Restart the MySQL/MariaDB service:

    # systemctl restart mysql

    # systemctl restart mariadb

 

For Windows Server

 

  1. Connect to a Plesk server via RDP

  2. Open the %plesk_dir%\Databases\MySQL\my.ini file in a text editor.

  3. Add the max_connections parameter with a required value under the [mysqld] section:

    CONFIG_TEXT: max_connections=150

  4. Save the changes and close the file.
  5. Restart the MySQL/MariaDB XX service via Plesk Services Monitor to apply changes:


    Screenshot.png

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.