zoukankan      html  css  js  c++  java
  • ambari安装hive检测TEST CONNECTION时报Access denied for user 'hive'@'xxxxx' (using password: YES)错误,一直连接不上

    2021-02-05 22:35:36,606 - Check db_connection_check was unsuccessful. Exit code: 1. Message: Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
    ERROR: Unable to connect to the DB. Please check DB connection properties.
    java.sql.SQLException: Access denied for user 'hive'@'VM-16-6-centos' (using password: YES)
    
    Traceback (most recent call last):
      File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 546, in <module>
        CheckHost().execute()
      File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 352, in execute
        method(env)
      File "/var/lib/ambari-agent/cache/custom_actions/scripts/check_host.py", line 207, in actionexecute
        raise Fail(error_message)
    resource_management.core.exceptions.Fail: Check db_connection_check was unsuccessful. Exit code: 1. Message: Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
    ERROR: Unable to connect to the DB. Please check DB connection properties.
    java.sql.SQLException: Access denied for user 'hive'@'VM-16-6-centos' (using password: YES)
    
    • 解决方法:
      Access denied for user 'hive'@'VM-16-6-centos' (using password: YES)来看,是mysql没有获取授权导致,通过以下操作即可解决:
    GRANT ALL PRIVILEGES ON *.* TO 'ambari'@'VM-16-6-centos' IDENTIFIED BY '密码' WITH GRANT OPTION;
    GRANT ALL PRIVILEGES ON *.* TO 'hive'@'VM-16-6-centos' IDENTIFIED BY '密码' WITH GRANT OPTION;
    GRANT ALL PRIVILEGES ON *.* TO 'oozie'@'VM-16-6-centos' IDENTIFIED BY '密码' WITH GRANT OPTION;
    
    -----------------------------------------------------------
    shotting source code
  • 相关阅读:
    oracle 数据库关闭的的几种方式总结
    oracle热备份
    oracle 的 startup,startup mount,startup nomount之间的区别
    Oracle数据导入导出imp/exp命令总结
    oracle模糊查询效率可这样提高
    流程控制
    常量
    java序列化
    JVM锁说明
    go变量和数据类型
  • 原文地址:https://www.cnblogs.com/zh672903/p/14380110.html
Copyright © 2011-2022 走看看