欢迎使用CSDN-markdown编辑器
来源:互联网 发布:ubuntu 232 编辑:程序博客网 时间:2024/06/04 00:55
HIVE安装遇到的问题
环境信息
ubuntu 16.04具体问题
hive设置mysql为metastore数据库,执行数据库初始化命令
schematool -initSchema -dbType mysql
出现以下问题:
> root@ubuntu:/home/ac# schematool -initSchema -dbType mysql SLF4J:> Class path contains multiple SLF4J bindings. SLF4J: Found binding in> [jar:file:/usr/hive/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]> SLF4J: Found binding in> [jar:file:/usr/hadoop-2.7.4/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.0.109:3306/hive?createDatabaseIfNotExist=true> Metastore Connection Driver : com.mysql.jdbc.Driver Metastore> connection User: hive> org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get> schema version. Underlying cause:> com.mysql.jdbc.exceptions.jdbc4.CommunicationsException :> Communications link failure The last packet sent successfully to the> server was 0 milliseconds ago. The driver has not received any packets> from the server. SQL Error code: 0
如图:
解决办法
检查mysql数据库运行状态
systemctl status mysql.service
如果运行状态为active 则mysql运行状态正常
使用数据库可视化工具,无法链接数据库,但在ubuntu环境使用命令行登陆mysql,登陆正常
mysql -u hive -p
问题根因:
mysql的默认配置为了增强安全性,禁止了非本机的访问,在ubuntu中是这样,debian中也是,需要修改
# vi /etc/mysql/my.cnf
修改
bind-address = 127.0.0.1 为 bind-address = 0.0.0.0
修改完成后重启mysql服务
sudo /etc/init.d/mysql restart
再次执行数据库初始化命令
schematool -initSchema -dbType mysql
初始化成功
备注:hive 安装以及设置mysql作为metastore 操作方法参见
http://www.linuxidc.com/Linux/2017-05/143864.htm
阅读全文
0 0
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 欢迎使用CSDN-markdown编辑器
- 理论篇~第六章 元数据
- JavaWeb-NewsServlet-大总结
- 每天一个linux命令(4):mkdir命令
- 设计模式从零开始——代理模式
- 标签
- 欢迎使用CSDN-markdown编辑器
- 死锁产生的原因和解决方法
- Nginx配置文件nginx.conf中文详解(史上最全!!!!)
- Java面试题全集(上)
- genymotion出现INSTALL_FAILED_CPU_ABI_INCOMPATIBLE
- [PAT乙] 1019. 数字黑洞 (20)
- centos 创建svn多仓库,并用hooks同步更新
- redis-set常用命令
- java基础-个人知识点杂记1.OSI模型