Hive初始化schematool -dbType mysql -initSchema报错:
#
Initialization script hive-schema-2.3.0.mysql.sql
Error: Duplicate key name 'PCS_STATS_IDX' (state=42000,code=1061)
org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!
Underlying cause: java.io.IOException : Schema script failed, errorcode 2
Use --verbose for detailed stacktrace.
解决办法:
查看数据库中是否已经有hive或是metastore数据库,有的话删除:
drop database hive(metastore)

初始化完成:
2382

被折叠的 条评论
为什么被折叠?



