mysql message from server: “Too many connections“ 错误现象 解决方案

错误现象 :

Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Data source rejected establishment of connection, message from server: “Too many connections”

在这里插入图片描述

解决方法 :

修改 /etc/my.cnf ,添加以下一行:

在这里插入图片描述

修改最大连接数

max_connections=500

重启mysql

在这里插入图片描述

点停止

然后点开启

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_44226094/article/details/115982737