准备工作:
安装系统: centos/redhat 均可
关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
删除mariadb
rpm -qa | grep mariadb
yum remove -y mariadb-connector-c-config
下载:
MySQL :: Download MySQL Community Server (Archived Versions)
安装
解压缩到相应文件夹 tar -xvf mysql-8.0.32-1.el8.x86_64.rpm-bundle.tar
按照顺序安装
rpm -ivh mysql-community-common-8.0.32-1.el8.x86_64.rpm
rpm -ivh mysql-community-client-plugins-8.0.32-1.el8.x86_64.rpm
rpm -ivh mysql-community-libs-8.0.32-1.el8.x86_64.rpm
rpm -ivh mysql-community-client-8.0.32-1.el8.x86_64.rpm
rpm -ivh mysql-community-icu-data-files-8.0.32-1.el8.x86_64.rpm
rpm -ivh mysql-community-server-8.0.32-1.el8.x86_64.rpm
rpm -ivh mysql-community-devel-8.0.32-1.el8.x86_64.rpm
配置文件 vim /etc/my.cnf
添加:
port=3306
character-set-server=utf8
default-storage-engine=innodb