zoukankan      html  css  js  c++  java
  • hive初始化元数据 Access denied for user 'xiaoqiu'@'%' to database 'hive_metastore'

    [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:       xiaoqiu
    org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version.
    Underlying cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException : Access denied for user 'xiaoqiu'@'%' to database 'hive_metastore'
    SQL Error code: 1044
    Use --verbose for detailed stacktrace.
    *** schemaTool failed ***

    resolution:

    没有为数据库'hive_metastore'指定用户'xiaoqiu'登录到该数据库

    这里我重新创建了数据库hive_meta ,然后修改了hive-site.xml中的url

    为数据库hive-meta指定用户

    MariaDB [(none)]> grant all privileges on hive_meta.* to 'xiaoqiu'@'%';
    
    欢迎关注我的公众号:小秋的博客 CSDN博客:https://blog.csdn.net/xiaoqiu_cr github:https://github.com/crr121 联系邮箱:rongchen633@gmail.com 有什么问题可以给我留言噢~
  • 相关阅读:
    C/C++中变量的作用域和存储类型简介
    Java与JavaScript的区别你明白吗?
    js-2018-11-09 关于Array中的srot()方法和compare()方法
    js-2018-11-01 关于break和continue语句
    0427表格学习
    0426基础标签学习
    css3部分整理
    img图片占不满整个div
    基于google protobuf 的 socket udp 通信
    微信小程序echarts学习记录
  • 原文地址:https://www.cnblogs.com/flyingcr/p/10326868.html
Copyright © 2011-2022 走看看