BoneCp 连接Mysql数据库报异常!

java.sql.SQLException: Data source rejected establishment of connection,  message from server: "Too many connections"
 at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:582)
 at com.mysql.jdbc.Connection.createNewIO(Connection.java:1627)
 at com.mysql.jdbc.Connection.<init>(Connection.java:427)
 at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:395)
 at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
 at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
 at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1140)
 at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
 at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)

我修改了linux下mysql 配置文件的 max_connections =600,还是出现这个问题。

而用dbcp连接池不会。这是什么原因???郁闷中。。。。。。

你可能感兴趣的:(BoneCp 连接Mysql数据库报异常!)