【数据库】Cannot create PoolableConnectionFactory (null, message from server: "Host 'xxxxx' isnot allow

ⅰ亾dé卋堺 提交于 2020-02-26 15:39:28

1.问题出现

在学习activemq的时候,配置activemq去连接mysql 但是activemq一起动就报错误连接不到mysql 说不允许连接。

java.io.IOException: Cannot create PoolableConnectionFactory (null,  message from server: "Host '192.168.58.134' is not allowed to connect to this MySQL server")

2.问题分析

是mysql对用于进行限制远程客户端连接。修改一下就可以了。

3.问题解决

mysql > grant all privileges on db_name.* to usr_name@'%' identified by 'pwd';

其中,db_name 是数据库名, usr_name 用户名, pwd 密码。'%' 为通配符。

mysql > flush privileges ;

4.参考博客

https://blog.csdn.net/timo1160139211/article/details/72831771

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!