[mysql-5.7.31-1.el7.x86_64.rpm-bundle.tar]
SQL tar -xf mysql*****.tar |
SQL #检查是否mysql 、 mariadb rpm -qa |grep mysql rpm -qa |grep mariadb #删除 rpm -e --nodeps mysql***** |
SQL yum -y install libaio yum -y install net-tools yum -y install perl |
SQL rpm -ivh mysql-community-common-5.7.31-1.el7.x86_64.rpm rpm -ivh mysql-community-libs-5.7.31-1.el7.x86_64.rpm rpm -ivh mysql-community-client-5.7.31-1.el7.x86_64.rpm rpm -ivh mysql-community-server-5.7.31-1.el7.x86_64.rpm |
SQL systemctl start mysqld systemctl status mysqld |
![](https://img-blog.csdnimg.cn/b3b18961876b4e2ea8fc09134d3ee11f.png)
- 找到初始密码登陆mysql,密码中的;和(需要转译
![](https://img-blog.csdnimg.cn/a69e3b55041b4e46b5e35425701ce7ee.png)
SQL mysql -uroot -pEsp\;a%f8\(/7% |
报错如下![](https://img-blog.csdnimg.cn/dcff2a05f3cc46c190098a5e614015da.png)
SQL alter user 'root'@'localhost' identified by 'root'; flush privileges; |
修改下边参数,再执行修改密码就好了
SQL set global validate_password_policy=LOW; set global validate_password_length=4; |