- 卸载原有冲突的依赖包
rpm -e postfix
rpm -e mariadb-libs
- 按顺序安装
rpm -ivh mysql-community-common-5.7.27-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.27-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.27-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.27-1.el7.x86_64.rpm
3.查看初始密码
输入:cat /var/log/mysqld.log
4.使用初始密码登录
输入:mysql -u root -p
5.登录成功
6.修改初始密码
输入:alter user user() identified by "YX+5126Mysql";