• Underlying cause: java.sql.SQLException : Access denied for user 'root'@'s150' (using password: YES)


    hive初始化元数据的时候出错,该root用户没有权限

    [xiaoqiu@s150 /soft/hive/conf]$ schematool -initSchema -dbType mysql
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/soft/apache-hive-2.3.3-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/soft/hadoop-2.7.5/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
    SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
    Metastore connection URL:        jdbc:mysql://192.168.109.150:3306/hive_metastore?createDatabaseIfNotExist=true
    Metastore Connection Driver :    com.mysql.jdbc.Driver
    Metastore connection User:       root
    org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
    Underlying cause: java.sql.SQLException : Access denied for user 'root'@'s150' (using password: YES)
    SQL Error code: 1045
    Use --verbose for detailed stacktrace.
    *** schemaTool failed ***
    

    出错原因:root的密码设置错了,这里设置成了本地的root用户的登录密码

    MariaDB [mysql]> set password for root@localhost=password('root');

    应该设置成为s150的登录密码

    MariaDB [mysql]> set password for root@s150=password('root');

    查看mysql.user

    这时就可以初始化元数据了

    [xiaoqiu@s150 /soft/hive/conf]$ schematool -initSchema -dbType mysql
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/soft/apache-hive-2.3.3-bin/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/soft/hadoop-2.7.5/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
    SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
    Metastore connection URL:        jdbc:mysql://192.168.109.150:3306/hive_metastore?createDatabaseIfNotExist=true
    Metastore Connection Driver :    com.mysql.jdbc.Driver
    Metastore connection User:       root
    Starting metastore schema initialization to 2.3.0
    Initialization script hive-schema-2.3.0.mysql.sql
    Initialization script completed
    schemaTool completed
    
    欢迎关注我的公众号:小秋的博客 CSDN博客:https://blog.csdn.net/xiaoqiu_cr github:https://github.com/crr121 联系邮箱:rongchen633@gmail.com 有什么问题可以给我留言噢~
  • 相关阅读:
    关于WPF的控件对齐方式
    RTC与WebRTC有什么区别
    Ubuntu 14.04 单机安装 CEPH
    【DP专题】——棋盘分割
    征战蓝桥 —— 2015年第六届 —— C/C++A组第9题——垒骰子
    征战蓝桥 —— 2015年第六届 —— C/C++A组第9题——垒骰子
    征战蓝桥 —— 2015年第六届 —— C/C++A组第9题——垒骰子
    征战蓝桥 —— 2014年第五届 —— C/C++A组第10题——波动数列
    征战蓝桥 —— 2014年第五届 —— C/C++A组第10题——波动数列
    征战蓝桥 —— 2014年第五届 —— C/C++A组第10题——波动数列
  • 原文地址:https://www.cnblogs.com/flyingcr/p/10326878.html
Copyright © 2020-2023  润新知