千家信息网

Check connection related issue of mysql

发表于:2025-02-01 作者:千家信息网编辑
千家信息网最后更新 2025年02月01日,Check connection issue of mysql#show connection configurationshow variables like '%max_connection%';
千家信息网最后更新 2025年02月01日Check connection related issue of mysql

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


0