有时会遇到回应信息如下:
1 Cannot create PoolableConnectionFactory (Access denied for user 'root'@'10.0.1.23' (using password: YES))
这是数据库拒绝远程用户连接权限
解决方案:
在远程服务器的MySql中修改用户授权
如:授权test用户拥有testDB数据库的所有权限(某个数据库的所有权限):
1 mysql>grant all privileges on testDB.* to test@localhost identified by '1234'; 2 3 mysql>flush privileges;//刷新系统权限表
显示权限
1 show grants for test@'localhost';
本文转自: 清明-心若淡定 https://www.cnblogs.com/saryli/p/6697444.html