YUM安装MySQL 8.0

安装官方yum

rpm -ivh https://repo.mysql.com//mysql57-community-release-el7-9.noarch.rpm

 

调试yum

关闭旧版本

yum-config-manager --disable mysql57-community

开启新版本

yum-config-manager --enable mysql80-community

安装mysql8.0

yum install mysql-community-server -y

安装完毕,启动mysql服务

systemctl start mysqld

第一次登陆,系统生成一个零时密码

grep 'temporary password' /var/log/mysqld.log

更新密码

ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';

 

posted @ 2020-07-23 13:24  黑锦鲤  阅读(189)  评论(0编辑  收藏  举报