MySQL

Increase MySQL Maximum No Connection in CentOS VPS

In you have rather busy VPS, the default MYSQL Maximum No Connection maybe not sufficient. To increase follow the steps below.

1. SSH to your VPS

2. Check the current maximum no connection limit

echo "show variables like 'max_connections';" | mysql

3. Edit my MySQL file. Remember to backup your /etc/my.cnf prior to that.

vi /etc/my.cnf

4. Add or edit connection limit in the MySQL configuration file

max_connections = 250

5. Save MySQL configuration file

6. Restart mySQL

service mysql restart

7. Confirm the new maximum no connection limit

echo "show variables like 'max_connections';" | mysql