How to increase max_user_connections in MySQL from 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 edit the my.cnf file of MySQL in Linux VPS?

Linux VPS and Dedicated server customers can edit MySQL configuration settings by modifying...

How to change MySQL root password from WHM?

In this article, we will describe steps to change the root password of MySQL server from WHM....

How do I connect MySQL database via MySQL Workbench?

MySQL Workbench is the excellent MySQL client tool used to connect to remote MySQL database from...

How to rename MySQL Database from cPanel?

cPanel offers MySQL Database rename option. Renaming MySQL Database requires while migrating...

How to back up MySQL databases using AutoMySQLBackup?

What is AutoMySQLBackup? AutoMySQLBackup is a script that allows you to schedule the automatic...