How to Modify Max User Connections on VPS and Dedicated Servers

Max User Connections Hero Image

Occasionally, you may find yourself in a situation where you need to allow additional simultaneous connections to your MySQL database server. By default, all IMH servers allow 30 concurrent connections. To change this setting you will need to modify the my.cnf database configuration file, which can only be accessed on VPS or dedicated servers. In this article, we will outline how to modify the my.cnf file to increase the max_user_connections value on VPS and dedicated servers.

Know you’ll always be able to reach your customers when they need you with our Dedicated Hosting Services.

Modifying Max User Connections

  1. First, log into your server via SSH.
  2. Once logged in, use the cd command to change directory to the /etc folder as follows:
    cd /etc
  3. While in the /etc folder, open the my.cnf file for editing using a command-line text editor such as nano or vim.

  4. While editing the my.cnf file, locate the following setting:

    max_user_connections=30
     
  5. Once you have located the correct setting, change the value to the desired number of max connections. For example:
    max_user_connections=50
  6. Finally, save the changes and exit the text editor.

Now that you have increased the max_user_connection value by modifying the my.cnf file, your MySQL database server will be able to maintain more simultaneous connections. This is particularly useful for websites that require a large number of database queries, or searches, in order to function. It is important to note that setting this value too high can have adverse effects on the performance of the site. As such, it is crucial to find the optimal value that allows you the number of connections you need while avoiding placing too much stress on available system resources.

If you need help monitoring the performance of your database server, please check out this article that explains how to monitor MySQL performance.

AK
Alyssa Kordek Content Writer I

Alyssa started working for InMotion Hosting in 2015 as a member of the Technical Support team. Before being promoted to Technical Writer, Alyssa developed expertise in the fields of server hardware, Linux operating systems, cPanel, and WordPress. She now works to produce quality technical content featuring cutting-edge topics such as machine learning, data center infrastructure, and graphics card technology.

More Articles by Alyssa

Was this article helpful? Let us know!