无法使用mysql空密码启动配置单元元存储

5jvtdoz2  于 2021-06-26  发布在  Hive
关注(0)|答案(1)|浏览(371)

我的本地mysql没有登录密码,因此我将hive-site.xml config设置为:

<property>
    <name>javax.jdo.option.ConnectionPassword</name>
    <value/>
<description>password to use against metastore database</description>

但在推出metastore之后 hive --service metastore 它总是显示有密码

Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965) ~[mysql-connector-java-5.1.45-bin.jar:5.1.45]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973) ~[mysql-connector-java-5.1.45-bin.jar:5.1.45]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909) ~[mysql-connector-java-5.1.45-bin.jar:5.1.45]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:873) ~[mysql-connector-java-5.1.45-bin.jar:5.1.45]
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1710) ~[mysql-connector-java-5.1.45-bin.jar:5.1.45]
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1226) ~[mysql-connector-java-5.1.45-bin.jar:5.1.45]
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2188) ~[mysql-connector-java-5.1.45-bin.jar:5.1.45]
at com.mysql.jdbc.ConnectionImpl.connectOneTryO

如何修复?

bvjxkvbb

bvjxkvbb1#

在启动服务器时由add--hiveconf解决。

hive --hiveconf javax.jdo.option.ConnectionPassword= --service metastore

相关问题