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

摘要:
createDatabaseIfNotExist=trueMetastoreConnectionDriver.com.mysql.jdb.DriverMetastoreconnectionUser:rootorg.apache.hhadoop.hhive.metastore.HiveMetaException:无法获取方案规避。原因:java.sql.SQLException:访问用户'root'@'s150'SQLErrorcode:1045使用--verbosefordetailedstacktrace。***SchemaToolfailed***错误原因:根密码设置不正确。这里,它被设置为本地根用户MariaDB[mysql]˃的登录密码setpasswordforroot@localhost=密码;s150的登录密码应设置为MariaDB[mysql]˃setpasswordforroot@s150=密码;查看mysql。用户初始化元数据[xiaoqiu@s150/soft/hhive/conf]$schemaeool-initSchema-dbTypemysqlSLF4J:Classpath包含多个SLF4J绑定。SLF4J:Foundbindingin[jar:file:/soft/apache-hive-2.3.3-bin/lib/log4j-SLF4J-impl-2.6.2.jar!

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

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

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

[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

免责声明:文章转载自《Underlying cause: java.sql.SQLException : Access denied for user 'root'@'s150' (using password: YES)》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇nodejs获取文件信息,判断是文件或目录sympy简明用法下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

MFS+Keepalived双机高可用热备方案操作记录

基于MFS的单点及手动备份的缺陷,考虑将其与Keepalived相结合以提高可用性。在Centos下MooseFS(MFS)分布式存储共享环境部署记录这篇文档部署环境的基础上,只需要做如下改动: 1)将master-server作为Keepalived_MASTER(启动mfsmaster、mfscgiserv) 2)将matelogger作为Keepa...

003-Centos7.3下安装Jumpserver 1.0.0(支持windows组件)

Jumpserver最新版本支持windows组件,废话不多介绍了,下面直接介绍下部署过程: 0)系统环境 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 CentOS 7.3 IP: 192.168.10.210   [root@jumpserver-server ~]# cat /etc/red...

phpmyadmin创建数据库无权限

问题描述: 在使用wamps时,登录localhost/phpmyadmin后,在数据库页面创建一个新的数据库时,1.显示“无权限操作”,2.“账户”页面无法修改权限操作,且最底端的注意显示用户权限不够。 解决方法: 1.尝试了网上说的修改配置文件config.inc.php(修改phpmyadmin的登陆方式:cookie和http、添加 $cfg['S...

zabbix问题记录

zabbix部署好,在使用一段时间后,出现了不少报错,在此简单做一记录。1)Zabbix监控界面报错Lack of free swap space on Zabbix server”解决公司线上部署的zabbix3.0的监控界面首页报错说无交换内存主机“Lack of free swap space on Zabbix server”解决此问题的步骤如下:...

ubuntu切换到root

由于 Ubuntu 是基于 Debian 的 linux 操作系统,在默认的情况下,是没有超级用户(superuser, root)的,但有些系统操作必须有超级用户的权限才能进行,如手动释放内存等。 在其他 linux 操作系统 (如 fedora) 下,可以使用 su 切换到超级用户。 当输入 su 命令后, 系统会要求输入 root 的密码。 可是,在...

SELinux的启动和关闭

1、SELinux简介 SELinux是Security Enhanced Linux的缩写,字面上的意思就是安全强化的Linux,它是由美国国家安全局 (NSA) 开发的,整合到Linux核心的一个模块,是对于强制访问控制(MAC)的实现,是 Linux历史上最杰出的新安全子系统,提供了比传统的UNIX权限更好的访问控制。在SELinux的访问控制体系的...