1.启动Hive Metastore 时,报错信息如下
resource_management.core.exceptions.Fail: Execution of 'export HIVE_CONF_DIR=/usr/hdp/current/hive-metastore/conf/conf.server ; /usr/hdp/current/hive-metastore/bin/schematool -initSchema -dbType mysql -userName hive -passWord [PROTECTED]' returned 1. WARNING: Use "yarn jar" to launch YARN applications.Metastore connection URL:jdbc:mysql://node2/hive?createDatabaseIfNotExist=true
Metastore Connection Driver :com.mysql.jdbc.Driver
Metastore connection User:hive
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
*** schemaTool failed ***
2.解决办法:
登录hive所在的mysql数据,执行:grant all on *.* to "<hive_user>"@"%" identified by "<hive_user_password>";
参考 https://www.ibm.com/support/knowledgecenter/SSPT3X_4.3.0/com.ibm.swg.im.infosphere.biginsights.trb.doc/doc/trb_comp_hive_mysql.html