How to change max_user_connections in VPS/Dedicated

There are times when you may need to allow more simultaneous connections to your database. Our default setting is to allow 30 connections. If you need to change the setting, however, you will need to do so within your my.cnf file. The instructions below tell you how to make the changes on your VPS or Dedicated server.

Modifying your max_user_connections setting

  1. Log into your server via SSH.
  2. Move to the /etc folder.
  3. Open the my.cnf file for editing usng nano, vim, or your favorite editor.
  4. Locate the setting similar to below:
  5. Change the setting to your required level. Example:
  6. Close out your editor, saving the changes.

Now that you have increased the max_user_connection settings your MySQL will be able to hole more simultaneous connections. Note that making this number too high can have adverse effects on the performance of the site, so tweaking to find the optimal number may be necessary.

Was this article helpful? Let us know!