Mysql 最大进程数修改
一、登录mysql
mysql -uroot -p
二、查看最大进程数
show variables like 'max_connections';
三、查看当前连接最大数
show status like 'max%connections';
四、查看IP连接情况
select SUBSTRING_INDEX(host,':',1) as ip , count(*) from information_schema.processlist group by ip;
五、查看数据库连接情况
select count(*) from information_schema.processlist;
六、临时修改最大连接数,重启后失效
set GLOBAL max_connections=1000;
永久修改需要在 /etc/my.cnf 中进行修改
在[mysqld]块中修改或添加:max_connections=1000,重启mysql
七、查看进程列出前100条
show processlist;