MySQL提示:too many connections

1. The first query the maximum number of connections

show variables like '%max_connections%';

 

2. Check the current connection:

show processlist;

3. Batch kill the current connection:

Statement temporary files information_schema.processlist connection information table generation needs to dispose of MySQL connection, the temporary file and executes the instructions generated

Gets the current connection id:

select concat('KILL ',id,';') from information_schema.processlist where user='yxyq';

Dump file:

select concat('KILL ',id,';') from information_schema.processlist where user='yxyq' into outfile 'D:/BCSoftware/mysql-8.0.13-winx64/a.txt';

executable file:

source D:/BCSoftware/mysql-8.0.13-winx64/a.txt;

 

 

Other kill ways: https://www.cnblogs.com/liang545621/p/9401113.html

 

Guess you like

Origin www.cnblogs.com/minutes/p/11088638.html