今天配置hive连接mysql时一直报这个问题
FAILED: Error in metadata: javax.jdo.JDOFatalDataStoreException: Access denied for user 'root'@'hadoop1' (using password: YES)
NestedThrowables:
java.sql.SQLException: Access denied for user 'root'@'hadoop1' (using password: YES)
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
找了好久,网上说是
这是因为mysql不允许远程访问的问题,没有对用户进行授权。
执行 grant all on *.*
问题就是这个对我没用用效果,
mysql> select user,host,password from mysql.user;
+------+-----------+-------------------------------------------+
| user | host | password |
+------+-----------+-------------------------------------------+
| root | localhost | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
| root | hadoop1 | |
| root | 127.0.0.1 | |
| root | ::1 | |
| | localhost | |
| | hadoop1 | |
| hive | % | *E74858DB86EBA20BC33D0AECAE8A8108C56B17FA |
| root | % | *81F5E21E35407D884A6CD4A731AEBFB6AF209E1B |
+------+-----------+-------------------------------------------+
8 rows in set (0.00 sec)
后来看到一篇文章,说把IP改成localhost.恩,解决了