【Hive】Causedby:MetaException(message:Hivemetastoredatabaseisnotinitialized.Pleas
程序员文章站
2022-03-27 21:34:00
启动Hive报错如下:
Caused by: MetaException(message:Hive metastore database is not initialized. Please...
启动Hive报错如下:
Caused by: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))
从报错原因可以看出,没有初始化,需要在Hive安装目录的bin目录下面执行:
./schematool -initSchema -dbTypemysql(根据实际安装的数据库改写,因为安装的是mysql,所以我在此处填写的mysql)。
查找schematool文件目录方式:
su - root
find / -name schematool