错误现象 :
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
点停止
然后点开启