初衷:有些mysql常用查询命令总是不能记住,在使用过程中做个汇总,方便查阅
查看当前运行事务
SELECT * FROM information_schema.INNODB_TRX;
查看当前所有进程
SHOW FULL PROCESSLIST;
查看编码
show variables like 'char%';
最大连接数设置查看
SHOW VARIABLES LIKE '%max_connections%';
查看当前IP连接数量
SELECT substring_index(host, ':',1) AS host_name,state,count(*) FROM information_schema.processlist GROUP BY state,host_name;
数据包大小设置
##查询
show VARIABLES like '%max_allowed_packet%';
#修改设置
set global max_allowed_packet = '157286400';