Centos7.3安装Mysql8.0

下载rpm

Centos7.3安装Mysql8.0_第1张图片

 

 

安装 yum repo文件并更新 yum 缓存

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

执行结果:

会在/etc/yum.repos.d/目录下生成两个repo文件mysql-community.repo mysql-community-source.repo

 

执行

yum clean all
yum makecache
 
查看mysql yum仓库中mysql版本,使用如下命令
yum repolist all | grep mysql

  Centos7.3安装Mysql8.0_第2张图片

 

安装

yum install mysql-community-server

  Centos7.3安装Mysql8.0_第3张图片

 

启动mysql并获取初始密码

 

mysql配置

use mysql;
select user,host from user;
update user set host='%' where user='root';
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'abcd!123abcd;
'root'@'%'是个坑

 

转载于:https://www.cnblogs.com/xinyibufang/p/11380444.html

你可能感兴趣的:(Centos7.3安装Mysql8.0)