How to increase max_user_connections in Linux VPS?

More often you receive Too many connections error when you attempt to connect MySQL server. This error is self explanatory and tells that all available connections are being used by other clients. If you want to allow more simultaneous connections to MySQL database, you may need to tweak max_user_connections settings in my.cnf file. Following article will instruct you how to increase MySQL connections.

 

NOTE: Following instructions are only applicable to VPS and Dedicated server users. Furthermore, you will need root access to modify my.conf file. 

 

  1. Login to your Linux machine via SSH.

  2. Edit my.cnf file using your choice of editor like vi, nano, vim or pico.

    vi /etc/my.cnf
  3. Locate the setting similar to below.

    [mysqld]
    local-infile=0
    datadir=/var/lib/mysql
    user=mysql
    symbolic-links=0
    max_user_connections = 20
  4. Change the value of max_user_connections to your required level. For example, we want to set maximum connection value to 50.

    max_user_connections = 50 
  5. Save the changes and close the editor.

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to check MYSQL Database size in phpMyAdmin and from command?

Sometimes it is required to check the MySQL Database size. You can check it from the phpMyAdmin...

How to Optimize MySQL Database Using phpMyAdmin?

Database always grows in size due to high traffic or a large amount of content. This will lead to...

How to Fix Error Forcing close of thread 310 user: 'root' in MySQL?

Problem Statement MySQL server keeps on shutting down. Error Message C:\Program...

How to enable the slow query log in MySQL?

Slow MySQL queries can significantly lower down the performance of your web application and eat...

How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

Problem Statement MySQL service is stopped. Error Message 150206 4:42:12 [ERROR] Plugin...