解决出现:Caused by: java.sql.SQLException: Access denied for user ‘root’@‘hadoop102’ (using password: YES)的问题。
此问题的出现是由于,在hadoop调用mysql进行存储数据时,相当于远程计算机与mysql连接,需要赋予此计算机权限,可以利用命令:
grant all privileges on . to ‘root’@‘主机名’ identified by ‘123456’ with grant option; 来完成计算机权限的设置。
如果设置后还是无法连接,则需要考虑设置的密码是否有问题。
2021-02-03
最新推荐文章于 2023-11-22 09:25:09 发布