HIVE-ERROR 1045 (28000): Access denied for user 'root'@'%' (using password: YES)

来源:互联网 发布:网络电视如何看3d电影 编辑:程序博客网 时间:2024/06/18 10:14

在安装Hive的时候报错:

org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
Underlying cause: java.sql.SQLException : Access denied for user 'root'@'master.hadoop' (using password: YES)

解决方案:

1.首先登陆用root用户登录mysql

mysql -u root -p

2.查看root下

mysql> select user,host from mysql.user where user='root';


mysql> select user,host from mysql.user where user='root';
+------+-----------------+
| user | host            |
+------+-----------------+
| root | %               |
| root | 127.0.0.1       |
| root | 192.168.191.100 |
| root | localhost       |
| root | master.hadoop   |
+------+-----------------+
5 rows in set (0.00 sec)

3.原因是'root'@'master.hadoop'用户权限不足,利用root用户给该用户分配权限

mysql> grant all on *.* to 'root'@'master.hadoop' identified by '你的密码';

4.测试'root'@'master.hadoop'是否能登录

mysql -u root -h 'master.hadoop' -p

5.问题解决


阅读全文
0 0
原创粉丝点击