通过下面链接下载软件(MySQL/软件/mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar)
https://pan.baidu.com/s/16mYajunoFNMxItzjMhPdIQ 提取码:08ao
1、tar -vxf mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar
2、rpm -ivh mysql-community-common-5.7.28-1.el7.x86_64.rpm
3、rpm -ivh mysql-community-libs-5.7.28-1.el7.x86_64.rpm
4、rpm -ivh mysql-community-libs-compat-5.7.28-1.el7.x86_64.rpm
5、rpm -ivh mysql-community-client-5.7.28-1.el7.x86_64.rpm
6、rpm -ivh mysql-community-server-5.7.28-1.el7.x86_64.rpm
7、rpm -ivh mysql-community-devel-5.7.28-1.el7.x86_64.rpm
8、mysqld --initialiaze --user=mysql
9、查看初始化密码 cat /var/log/mysqld.log
10、通过初始密码登录mysql,修改密码为自己想要的密码,然后flush privileges