message from server: "Host 'xxx' is not allowed to connect to this MySQL server"

来源:互联网 发布:java字符串与空拼接 编辑:程序博客网 时间:2024/06/11 14:50

tomca在启动的时候报错是:Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (null, message from server: "Host 'SW-Fanny' is not allowed to connect to this MySQL server")

本来是连测试服务器的mysql,今天换了回连自己本地的mysql,就报了这个错。
在网上找一个解决方法,要修改mysql安装目录下的my.ini文件,加一个配置:max_connect_errors=100。但是我试了一下,没用。
又找到一个帖子,说必须要给mysql的用户设置一个密码,这个有点靠谱,因为我确实没有密码,所以重新配置mysql,加个密码。
OK,搞定~

原创粉丝点击