Solve the warning: connect to mysql server 127.0.0.1: Too many connections

Tuesday, September 7, 2010 posted by Till

If you get the error message "connect to mysql server 127.0.0.1: Too many connections" in a log file, e.g. the mail.log file, then the max. number of mysql database connections on your server is reached. To increase the max. number of simultanious connections, edit the MySQL my.cnf file:

vi /etc/mysql/my.cnf

and add or change the lines for mysql max_connections and max_user_connections in the [mysqld] section of the my.cnf file:

[mysqld]
......
max_connections = 500
max_user_connections = 500
.......

Be Sociable, Share!



One Response to “Solve the warning: connect to mysql server 127.0.0.1: Too many connections”

  1. Mark says:

    You can also run
    SET GLOBAL max_connections = 500;
    in the mysql cli if you don’t want to restart your server.
    Ofcourse you sill need it added to my.cnf so its used on the next restart.

Leave a Reply