MySQL 5.7.24 报错 Error 1040: Too many connections

报错信息:

Error 1040: Too many connections

原因:

mysql> show variables like 'max%conn%';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| max_connect_errors   | 100   |
| max_connections      | 151   |
| max_user_connections | 0     |
+----------------------+-------+
3 rows in set (0.01 sec)


添加或者修改参数:
## vim /etc/my.cnf
max_connections = 500
重启生效

查看验证:

 

你可能感兴趣的:(MySQL)