Introduction

Some administrators may need to set a different MAX_USER_CONNECTIONS value for a user than the server-wide value. This article provides the steps to set this value for a MySQL user.

Please note that this guide is intended for system administrators. cPanel's Technical Analysts cannot assist in setting MAX_USER_CONNECTIONS for a MySQL user.

 

Procedure

  1. Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
  2. Use the following command to set the MAX_USER_CONNECTIONS value for MySQL user.
    mysql -e "ALTER USER '$user'@'$host' WITH MAX_USER_CONNECTIONS $value;"
    Please note that "$user," "$host," and "$value" must be replaced with the MySQL username, the server's hostname or IP address, and the new connection limit.

 

Additional resources

How to restrict the number of MySQL connections by users

System Administration Services