Centos7.3安装Mysql8.0
下载rpm
安装 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
安装
yum install mysql-community-server
启动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'@'%'是个坑