The specified database user/password combination is rejected: com.mysql.cj.exceptions.CJException:
The specified database user/password combination is rejected: com.mysql.cj.exceptions.CJException: Access denied for user 'root'@'192.168.235.1' (using password: YES)
·
问题描述
JAVA环境连接数据库报错,信息如下所示
The specified database user/password combination is rejected: com.mysql.cj.exceptions.CJException: Access denied for user ‘root’@‘192.168.235.1’ (using password: YES)
问题解决
1、给数据库添加远程访问的权限
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
FLUSH PRIVILEGES;
2、重启连接数据库访问
更多推荐
已为社区贡献1条内容
所有评论(0)