Blogger Information
Blog 41
fans 0
comment 1
visits 40360
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
CentOS7.x 下yum安装MySQL5.7
yeyiluLAMP
Original
958 people have browsed it

CentOS 7.x 版本下默认安装的数据库是MySQL的分支mariadb,因此我们在安装MySQL之前需要把mariadb的yum源卸载

然后再到MySQL官网下载MySQL5.7的yum源

snipaste20171116_204225.png


snipaste20171116_204256.png

下载MySQL源

wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

安装源(如上命令一致)

yum localinstall mysql57-community-release-el7-11.noarch.rpm

snipaste20171116_204332.png


通过以上的命令找到MySQL第一次安装的默认密码

mysql -uroot -p


登录进入mysql以后需要赋予MySQL新的密码才可以对MySQL进行增删改查的操作,新密码如123456

SET PASSWORD=PASSWORD('123456');

以上操作后又遇到新问题:

ERROR
1819 (HY000): Your password does NOT satisfy the CURRENT policy
requirements。


又参考了官方文档,见 http://dev.mysql.com/doc/refman/5.7/en/validate-password-plugin.html
应该是密码过于简单了。 后来用大写字母+数字+特殊字符混合了一个密码。重置密码成功!
以后操作,没有再出现上述问题

注意:如果只想设置简单密码需要修改两个全局参数:

mysql> set global validate_password_policy=0;
mysql> set global validate_password_length=1;

再次执行修改密码的命令,这样就可以解决了







Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!