hive3初始化数据库报错
场景:
hive版本:3.1.1
Hadoop版本:HA3.1.1
系统:CentOS 7.6
hive03.1.1初始化MySQL远程数据库报错:
$ schematool -dbType mysql -initSchema
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/hive/apache-hive-3.1.1/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/hadoop-3.1.1/share/hadoop/common/lib/slf4j-log4j12-1.7.25.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.1.18:3306/hive
Metastore Connection Driver : com.mysql.cj.jdbc.Driver
Metastore connection User: &nbs

在使用hive3.1.1版本初始化连接到MySQL的元数据存储时遇到错误,SLF4J绑定冲突和ClassNotFoundException: com.mysql.cj.jdbc.Driver。解决方法是将配置文件hive-site.xml中`<name>javax.jdo.option.ConnectionDriverName</name>`的值从`com.mysql.cj.jdbc.Driver`改为`com.mysql.jdbc.Driver`,然后重新初始化Hive,问题得到解决。
最低0.47元/天 解锁文章
796

被折叠的 条评论
为什么被折叠?



