Check connection related issue of mysql

yuanqc發表於2018-09-30

Check connection issue of mysql


#show connection configuration
show variables like '%max_connection%';


#Change the limitation of max_connection temporarily
set global max_connections=600;


#check current status
status;

#check how many processes running
show processlist;


#Kill the locked connections
for id in `mysqladmin processlist | grep -i locked | awk '{print $1}'`
do
   mysqladmin kill ${id}
done


#Run killing sql

source kill_thread_id.sql


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10973950/viewspace-2215352/,如需轉載,請註明出處,否則將追究法律責任。

相關文章