首页 / HADOOP / hadoop2.7.5安装hive2.1.1启动报错Caused by: java.sql.SQLException: Access denied for user ‘root‘@‘node03‘
hadoop2.7.5安装hive2.1.1启动报错Caused by: java.sql.SQLException: Access denied for user ‘root‘@‘node03‘
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了hadoop2.7.5安装hive2.1.1启动报错Caused by: java.sql.SQLException: Access denied for user ‘root‘@‘node03‘,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含6028字,纯文字阅读大概需要9分钟。
内容图文
![hadoop2.7.5安装hive2.1.1启动报错Caused by: java.sql.SQLException: Access denied for user ‘root‘@‘node03‘](/upload/InfoBanner/zyjiaocheng/858/c01bfe663bd447d795b674765940632c.jpg)
1.报错截图和日志
hadoop2.7.5安装hive2.1.1启动报错
Caused by: java.sql.SQLException: Access denied for user ‘root’@‘node03’ (using password: YES) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
[root@node03 apache-hive-2.1.1-bin]# bin/hive
which: no hbase in (:/export/servers/apache-hive-2.1.1-bin/bin::/export/servers/hadoop-2.7.5/bin:/export/servers/hadoop-2.7.5/sbin::/export/servers/jdk1.8.0_144/bin::/export/servers/hadoop-2.7.5/bin:/export/servers/hadoop-2.7.5/sbin::/export/servers/jdk1.8.0_144/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/export/servers/apache-hive-2.1.1-bin/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/export/servers/hadoop-2.7.5/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Logging initialized using configuration in jar:file:/export/servers/apache-hive-2.1.1-bin/lib/hive-common-2.1.1.jar!/hive-log4j2.properties Async: true
Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:591)
at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:531)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:226)
at org.apache.hadoop.hive.ql.metadata.Hive.<init>(Hive.java:366)
at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:310)
at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:290)
at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:266)
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:558)
... 9 more
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1654)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:80)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:130)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:101)
at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3367)
。。。
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1652)
... 23 more
Caused by: javax.jdo.JDOFatalDataStoreException: Unable to open a test connection to the given database. JDBC url = jdbc:mysql://node03:3306/hive?createDatabaseIfNotExist=true&useSSL=false, username = root. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Access denied for user 'root'@'node03' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
NestedThrowables:
java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:mysql://node03:3306/hive?createDatabaseIfNotExist=true&useSSL=false, username = root. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Access denied for user 'root'@'node03' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
Caused by: java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:mysql://node03:3306/hive?createDatabaseIfNotExist=true&useSSL=false, username = root. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Access denied for user 'root'@'node03' (using password: YES)
Caused by: java.sql.SQLException: Access denied for user 'root'@'node03' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
2.按照文档安装都没有错,hadoop,mysql,等。后来查阅发现是
mysql和hive是在同一台主机所以将ip地址改为本机
在hive-site.xml配置文件中,ip配置成了node03
有192.168.72.163改为node03后 MySQL用户名也随之发生成APP,此时需要在其中对其重新授权;
3.解决办法:权限问题
进入mysql
mysql -uroot -p123456
赋予本地操作权限
grant all privileges on *.* to 'root'@'node03' identified by '123456' with grant option;
赋予远程操作权限
grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
刷新权限
flush privileges;
4.再次启动hive,完美Ok.
花了很久才解决,特做此记录。
*参考文章https://blog.csdn.net/qq_43688472/article/details/85314554
内容总结
以上是互联网集市为您收集整理的hadoop2.7.5安装hive2.1.1启动报错Caused by: java.sql.SQLException: Access denied for user ‘root‘@‘node03‘全部内容,希望文章能够帮你解决hadoop2.7.5安装hive2.1.1启动报错Caused by: java.sql.SQLException: Access denied for user ‘root‘@‘node03‘所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。