hive> show databases;
报错FAILED: HiveException java.lang.RuntimeException: Unable to instantiateorg.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
首先初始化MySQL数据库schematool -dbType mysql -initSchema,报错发现MySQL之前有创建过hive数据库,将它删了,再初始化MySQL数据库后因为hive-site.xml中有配置hive,再查看MySQL的数据库有新建的hive数据库,再进入hive,能使用show databases等命令。