`
ohfanfan
  • 浏览: 51152 次
  • 性别: Icon_minigender_1
  • 来自: 厦门
社区版块
存档分类
最新评论

tomcat启动mysql报错:SQLNestedException: Cannot create PoolableConnectionFactory

阅读更多
tomcat启动mysql报错:SQLNestedException: Cannot create PoolableConnectionFactory



报错错信息为:
......
2010-02-24 15:50:40,843 ERROR [org.hibernate.util.JDBCExceptionReporter] - <Cannot create PoolableConnectionFactory (null,  message from server: "Host
'SVCTAG-0' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'")>
2010-02-24 15:50:40,843 WARN [org.hibernate.cfg.SettingsFactory] - <Could not obtain connection metadata>
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (null,  message from server: "Host 'SVCTAG-0' is blocked because o
f many connection errors
; unblock with 'mysqladmin flush-hosts'")
        .......   


经过网络查询,问题原因:数据库中该主机的错误链接过多。mysql当你为非法连接,不允许登陆并边接。
解决方法:
更改mysql的配置文件中的允许错误连接参数——max_connect_errors=100。
具体为:在MYSQL安装目录下,找到my.ini文件,在文件中找到错误连接配置并进行更改,如果没有该参数设置,直接添加即可。


遗留问题:
  未发现:该机器的错误连接是如何产生的,以及产生原因。
  
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics