安装
如果之前有安装过mysql8,先卸载
yum remove mysql mysql-server mysql-libs mysql-server -y;
rm -rf /var/log/mysqld.log;
find / -name mysql; // 找到有关系统的mysql,有rm -rf 删除,如下
rm -rf /etc/logrotate.d/mysql ;
rm -rf /etc/selinux/targeted/active/modules/100/mysql /etc/selinux/targeted/tmp/modules/100/mysql;
rm -rf /var/lib/pcp/config/pmlogconf/mysql /var/lib/mysql;
rm -rf /var/lib/mysql/mysql /usr/bin/mysql /usr/lib64/mysql;
MySql8下载,选择Red Hat 对应系统版本 第一个.bundle.tar,查看发行版本cat /etc/redhat-release
// 用wget下载 或 sftp 上传
tar -xvf mysql-*.tar // 解压
chmod 777 *.rpm 赋予执行权限
// 顺序安装
rpm -ivh mysql-community-common-8
rpm -ivh mysql-community-libs-8
rpm -ivh mysql-community-libs-co