首页 > 解决方案 > Hive:java.sql.SQLSyntaxErrorException:表'metastore.dbs'不存在

问题描述

我正在使用 hive 版本:3.2.1 和 hadoop 版本:3.2.1 和 metastore 数据库:mysql

尝试在调试模式下运行 hive 时:

$hive -hiveconf hive.root.logger=DEBUG,console

我收到错误

metastore.dbs table does not exists.

Caused by: java.sql.SQLSyntaxErrorException: Table 'metastore.dbs' doesn't exist

下面是我的 hive-site.xml 的片段

<property>
<name>javax.jdo.option.ConnectionURL</name>
#<value>jdbc:derby:;databaseName=metastore_db;create=true</value>
 <value>jdbc:mysql://localhost:3306/metastore?createDatabaseIfNotExist=true</value>
<description>
  JDBC connect string for a JDBC metastore.
  To use SSL to encrypt/authenticate the connection, provide database-specific SSL flag in the connection URL.
  For example, jdbc:postgresql://myhost/db?ssl=true for postgres database.
</description>
</property>

请帮助解决错误。

标签: mysqlhadoophive

解决方案


推荐阅读