登录mysql进行查看:
Mysql –uroot –p123456
mysql> show variables like'%max_connections%';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 151 |
+-----------------+-------+
1 row in set (0.00 sec)
==================
mysql默认的最大连接数为151,上限为100000
===================
修改mysql默认的最大连接数为1000
在/etc/my.cnf文件中[mysqld]部分增加max_connections=1000,重启mysql服务
mysql -uroot -p123456
mysql> set global_max_connections = 200;
mysql> show processlist;
mysql> show status;