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

6 posts / 0 new
Last post
#1 Sat, 04/07/2012 - 03:30
alexandralin

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,

Fri, 04/13/2012 - 20:10
andreychek

Howdy,

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

http://dev.mysql.com/doc/refman/5.5/en/too-many-connections.html

You'll essentially need to edit your my.cnf file in /etc, and increase your "max_connections" variable.

-Eric

Tue, 04/17/2012 - 22:38
alexandralin

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,

Tue, 04/17/2012 - 23:02
alexandralin

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,

Wed, 04/18/2012 - 08:02
andreychek

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

-Eric

Wed, 04/18/2012 - 08:53
Locutus

@alex: One hint and one advice. :) 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.

Topic locked