admin管理员组文章数量:1516870
运行Sqoop时出现:
java.sql.SQLException: Access denied for user 'root'@'hadoop-master' (using password: YES)
使用对应的hadoop-master对应的IP登录,失败。直接赋予%权限,问题依旧
grant all privileges on *.* to root@'%' identified by '123456' with grant option;
flush privileges;原因:
MySQL会先判断授权的IP是否配置映射,有多条权限记录时,如果其中某些记录配置了 IP host 映射,可能会产生不能访问
解决办法:
1. 给对应host授权
# 检查数据库中root是否绑定host为hadoop-master
select user,host from mysql.user where user = 'root';
# 如果没有的话赋予对应权限
grant all privileges on *.* to root@'hadoop-master' identified by '123456' with grant option;
flush privileges;2. 只保留host为%
#修改user表,把Host表内容修改为%
update user set host='%' where host='localhost';
#删除root用户的其他host
delete from user where Host='hadoop-master';
delete from user where Host='127.0.0.1';
del版权声明:本文标题:新手困惑:从Hadoop到MySQL,这步怎么跨不过去? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.betaflare.com/biancheng/1771737214a3268906.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论