1.先装mysql再装hive
2.根据这篇博文安装mysql:https://www.jianshu.com/p/276d59cbc529
安装过程debug:https://blog.youkuaiyun.com/zxlhaoren/article/details/88022523
Remove Your MySQL Config File很有用
3.查询错误日志:/usr/local/mysql/data/hadoop01.err
使用命令/usr/local/mysql/support-files/mysql.server start启动服务器出错时可以查询错误日志
出现错误:
[ERROR] Can't start server : Bind on unix socket: Address already in use
[ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
[ERROR] COLLATION 'utf8_general_ci' is not valid for CHARACTER SET 'latin1'
解决:更改/tmp/mysql.sock的权限
chown -R mysql.mysql tmp/mysql.sock
之后可成功启动服务器
4.启动hive时报错:java.net.ConnectException: Call From hadoop03/192.168.192.103 to hadoop01:9000 failed
解决方法:没启动hdfs。用命令start-dfs.sh启动。
5.hive正常启动后可进行操作但会有警告:WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
在配置文件/conf/hive-site.xml中添加字段:

在如图拖黑位置中加入useSSL=false,用?与前面分隔开
本文详细记录了安装hive和mysql的过程,包括先安装mysql,然后参照教程进行安装,并在遇到启动错误时,通过查看错误日志解决问题,如修改/tmp/mysql.sock的权限。在启动hive时,发现必须先启动hdfs,添加相关配置以消除警告。
1162

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



