MySQL连接数太多导致无法连接问题


//查看mysql连接进程列表
show full processlist;
//查看连接数
show variables like '%max_connections%';
show global status like 'Max_used_connections';

//查看进程休息多少秒后清除连接
show global variables like 'wait_timeout';

//设置禁触休息多少秒后清除连接
set global wait_timeout=10000;
set global interactive_timeout=300;


//group_concat 连接超过长度设置,默认是1024字节
SET GLOBAL group_concat_max_len = 102400;

SET SESSION group_concat_max_len = 102400;

//查看concat字节数
show variables like "%concat%";

 

MySQL 8 之后,
变量名修改为:tx_isolation => transaction_isolation 
就需要使用:show variables like 'transaction_isolation'; 
更新语句:set global transaction_isolation = 'READ-COMMITTED'; 
要不会报错提示找不到全部变量tx_isolation


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM