zoukankan      html  css  js  c++  java
  • 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 有什么问题可以给我留言噢~
  • 相关阅读:
    文件传输协议FTP
    过河问题 还是不会 去学请教一下 数学老师 -----
    ----堆栈 STL 函数库 ----有待补充
    UVa 101
    例题 5-1 STL
    课后题 3-3 水题
    第八届河南省省赛 A.挑战密室
    课后题--------求分子量-----Molar mass------
    课后题3-1
    ---------快排-----表排-----基数排序(桶排序)-----
  • 原文地址:https://www.cnblogs.com/flyingcr/p/10326878.html
Copyright © 2011-2022 走看看