centos7通过yum安装mysql5.7以上版本

发布时间 2023-05-20 03:10:32作者: 流走在黑夜深巷的猫

1.检查并卸载mariadb

yum remove *mariadb*

遇到要求输入直接y/n 直接输入y回车

2.下载并安装mysql

mysql源地址:https://repo.mysql.com/
找到自己需要的版本,把版本名和 mysql源地址拼接起来,列如:我下载的是mysql80-community-release-el7.rpm,所以拼接起来就是filei下载地址 https://repo.mysql.com/mysql80-community-release-el7.rpm
image

wget https://repo.mysql.com/mysql80-community-release-el7.rpm
yum -y install mysql80-community-release-el7.rpm

3.安装并启动mysql服务器

yum -y install mysql-community-server
systemctl start  mysqld.service
systemctl enable  mysqld.service
systemctl daemon-reload