启动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 -dbType mysql(根据实际安装的数据库改写,因为安装的是mysql,所以我在此处填写的mysql)。
查找schematool文件目录方式:
su - root
find / -name schematool