最近在学习sqoop,mysql连接hive都配好后发现mysql版本太低是5的,不兼容,该如何升级😭😭
在清华镜像源的地址上面有帮助文档,地址是 https://mirrors.tuna.tsinghua.edu.cn/help/mysql/
安装mysql5.7版本的,需要:
新建 /etc/yum.repos.d/mysql-community.repo,内容如下:
[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-connectors-community-el7-$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql
[mysql-tools-community]
name=MySQL Tools Community
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-tools-community-el7-$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql
[mysql-5.6-community]
name=MySQL 5.6 Community Server
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-5.6-community-el7-$basearch/
enabled=0
gpgcheck=1
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql
[mysql-5.7-community]
name=MySQL 5.7 Community Server
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-5.7-community-el7-$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.mysql.com/RPM-GPG-KEY-mysql
执行 yum makecache
命令
通过 yum search mysql | grep community
找到需要安装的数据库 mysql-community-server.x86_64
,然后用 yum -y install mysql-community-server
即可。
还有一种安装方式是通过在官网上下载二进制包,解压初始化后,简单配置就可以使用了。
不知道你这个问题是否已经解决, 如果还没有解决的话:hive建议使用1.8.几的版本,Hadoop建议使用2.7.3,MySQL跟hive版本差不多就行,只高不低。