执行初始化hive代码
schematool -initSchema -dbType mysql -verbose
发现报错:
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
Underlying cause: java.sql.SQLException : Access denied for user 'root'@'master' (using password: YES)
SQL Error code: 1045
org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
原文:
解决1:
检查一遍发现时在配置hive-site.xml时jdbc连接数据库时密码写错了
把他改为数据库密码即可(建议图片放大查看)
改完后再重新执行初始化代码就可以成功啦
解决2:加入路径
例如:cd /local/ && /bin/schematool -initSchema -dbType mysql -verbose