启动hive没有问题,但是当执行show tables或者create database xxx时,报错
FAILED: SemanticException org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
原来Hive2需要hive元数据库初始化
schematool -dbType mysql -initSchema
hive元数据初始化完毕之后,执行hive继续后面的操作即可。