mysql 查看连接数信息

1、查看最大连接数

show variables like '%CONNECTION%';
mysql 查看连接数信息_第1张图片
image.png

2、查看正在使用连接数
show status like 'Threads%'

mysql 查看连接数信息_第2张图片
image.png

3、查看每个ip的连接数
select SUBSTRING_INDEX(host,':',1) as ip , count(*) from information_schema.processlist group by ip;

mysql 查看连接数信息_第3张图片
image.png

你可能感兴趣的:(mysql 查看连接数信息)