1、首先,根据自己的机子到MySQL官网下载对应的数据库https://dev.mysql.com/downloads/mysql/
2、卸载mariadb,并解压Mysql
3、安装
rpm -ivh mysql-community-common-8.0.26-1.el7.x86_64.rpm --nodeps
rpm -ivh mysql-community-libs-8.0.26-1.el7.x86_64.rpm --nodeps
rpm -ivh mysql-community-client-8.0.26-1.el7.x86_64.rpm --nodeps
rpm -ivh mysql-community-server-8.0.26-1.el7.x86_64.rpm --nodeps
查看
4、初始化
CentOS7安装MySQL 8.0.26的过程 - 编程教程
又报错了