Centos8安装Mysql5.8

wget http://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

rpm -ivh mysql80-community-release-el7-3.noarch.rpm

yum repolist all | grep mysql

cd /etc/yum.repos.d/

vim mysql-community.repo

 

 yum module disable mysql

yum -y install mysql-community-server

修改root密码:

 grep 'temporary password' /var/log/mysqld.log     查看零时密码

mysql -uroot -p

set password for root@localhost = password('Zg!@#.6666qd');

use mysql;

update user set Host='%' where User='root';

flush privileges;

 

 

 

 

错误处理:

yum -y remove mariadb-config-3:10.1.20-2.el7.x86_64

rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022

posted @ 2022-05-13 14:19  小哥的吃喝玩乐  阅读(305)  评论(0编辑  收藏  举报