初始化hive出错,org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.

具体的错误为:org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
Underlying cause: java.sql.SQLException : Access denied for user 'root'@'xxx' (using password: YES)
SQL Error code: 1045
Use --verbose for detailed stacktrace.

*** schemaTool failed ***

具体的解决方法参考自:https://blog.csdn.net/peterchan88/article/details/78341852

错误原因用户xxxxx权限不足

进入mysql,查询用户:

初始化hive出错,org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.


修改用户权限:(修改的用户为hive中提示错误的用户XXXX)

初始化hive出错,org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.


退出数据库,执行初始化,成功。

初始化hive出错,org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.