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

<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


如何解决?

最佳答案

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

关于mysql - 无法使用MySql空密码启动Hive Metastore,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47688959/

10-16 21:35