使用yum命令下载并安装MySQL文件
1、下载rpm文件
yum localinstall https://repo.mysql.com//mysql80-community-release-el7-1.noarch.rpm
2、安装MySQL数据库
yum install mysql-community-server -y
3、启动数据库
service mysqld start
4、查看初始密码
grep 'temporary password' /var/log/mysqld.log
5、修改root密码
alter user user() identified by "abc123456";
网友评论