Error establishing a database connection /usr/bin/mysqlshow: Too many connections

Hi all,

Need your help, I got the problem with my site after my traffic increase. I can’t access to my site and get error message: Error establishing a database connection. When I want manage mysql database, I got the message: /usr/bin/mysqlshow: Too many connections.

May you help me to solve this problem? Thanks in advance.

Kind regards,


This document here describes how to resolve the “too many connections” error:

You’ll essentially need to edit your my.cnf file in /etc, and increase your “max_connections” variable.


Hi Eric,

Thanks for your advice,

I have type /etc/my.cnf use Putty and got the message:

“bash: /etc/my.cnf: Permission denied”

and I also try type /etc/mysql/my.cnf and got the message:

“bash: /etc/mysql/my.cnf: No such file or directory”

I also failed to WebMin dashboard and still got message: “Click this button to start the MySQL database server on your system with the command /etc/rc.d/init.d/mysqld start. This Webmin module cannot administer the database until it is started.”

Can I know detail step by step to resolve it? I’m so confuse… If it possible i can change it from Virtualmin dasboard. Thanks for your valuable time and kind help.

Kind regards,

Hi Eric,

I can run my site again after:

I stop mysql with command:
/etc/rc.d/init.d/mysqld stop

and restart it with command:
/etc/rc.d/init.d/mysqld start

but I still have a problem with command /etc/my.cnf
“bash: /etc/my.cnf: Permission denied”

Need your advice to increase max_connections…

Thanks and kind regards,

You would want to edit “/etc/mysql/my.cnf” with a text editor in order to tweak the max_connections variable.


@alex: One hint and one advice. :slight_smile: The hint: you can do the stop and start thing in one command with /etc/init.d/mysqld restart.

To edit text files, you might want to install “Midnight Commander”, which, among being a very good file manager, comes with an easy-to-use text editor named “mcedit”. So, mcedit /etc/mysql/my.cnf will do the trick once MC is installed.