查看、修改MySQL最大链接数
mysql root@localhost:(none)> show variables like '%max_connections%'; #查看mysql最大链接数
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 151 |
+-----------------+-------+
1 row in set
Time: 0.017s
mysql root@localhost:(none)> set global max_connections=1000; #将最大链接修改成1000
Query OK, 0 rows affected
Time: 0.001s
mysql root@localhost:(none)> show variables like '%max_connections%'; #再次查看
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 1000 |
+-----------------+-------+