Mysql 错误 "Host '172.16.129.96' is blocked

今天项目出现错误:  message from server: "Host '172.16.129.96' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'"

 

mysql连接不上,异常:

com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@768905b6 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:

java.sql.SQLException: null,  message from server: "Host '172.16.129.96' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'"

         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)

         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)

         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)

         at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1104)

         at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2412)

         at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2445)

         at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2230)

         at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:813)

         at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)

         at sun.reflect.GeneratedConstructorAccessor23.newInstance(Unknown Source)

         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

         at java.lang.reflect.Constructor.newInstance(Constructor.java:422)

         at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)

         at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)

         at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:334)

         at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)

         at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)

         at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)

         at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)

         at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)

         at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)

         at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)

 

         at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)

 

搞了很长时间,网上说使用 mysqladmin flush-hosts  来处理

但是机器的mysql一直登录不了

最后在 Mysql 工具中 执行  flush-hosts 就好了, 无语了

 

。。。。。。。。。。。。。

你可能感兴趣的:(mysql)