How to solve MySQL max_user_connections

I get the following error when I try to enter phpMyAdmin.

User ** already has more active connections max_user_connections

Can someone let me know how to close these DB connections from the end of the MySQL server?

Thank you for your time!

+5
source share
3 answers

Here I think you can solve your max_connections problem

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

+3
source

Firstly, it is a hack, but it works, especially on a shared host.
We all have bad "neighbors" sometimes, right?

/etc/ 30 50, my.cnf .

  • , , @mysql_connect().
  • 30 MUC, "or die()", .
  • " " die(header(location: THIS PAGE)) , mysql_close();

, . , , , .

+1

max_connections. MySQL, - (raw php, WordPress, phpBB), , , 60.

, , :

show global variables like '%connections%'

, :

show status like '%connected%'

, :

show full processlist

100 , . , . my.cnf MySQL. MySQL, .

MySQL. MySQL -, . . https://www.percona.com/blog/2014/07/29/prevent-mysql-downtime-set-max_user_connections/

. , - Apache . Apache, , , , . , Apache . , , , , . MySQL, . : Mysql , ubuntu EC2 micro

By the way, web applications like WordPress use a persistent connection pool. That is, they establish connections to the MySQL database, open them and reuse them. If your applications are busy, the lifetime of each connection should be a few minutes.

+1
source

All Articles