出现这个问题的原因是:密码过于简单。刚安装的mysql的密码默认强度是最高的,如果想要设置简单的密码就要修改validate_password_policy的值,

validate_password_policy有以下取值:

 

Policy Tests Performed
0 or LOW Length
1 or MEDIUM Length; numeric, lowercase/uppercase, and special characters
2 or STRONG Length; numeric, lowercase/uppercase, and special characters; dictionary file

 

如果要修改这个值,

1、先登入到mysql

mysql error You must reset your password using ALTER USER statement before executing this statement.

2、设置安全级别

mysql error You must reset your password using ALTER USER statement before executing this statement.

3、默认密码长度为8,可以设置为其它值,最小4位

mysql error You must reset your password using ALTER USER statement before executing this statement.

4、设置新密码,刚安装完的mysql必须设置新密码(应该是从5.5版本开始)

mysql error You must reset your password using ALTER USER statement before executing this statement.

 

 
 

安装完mysql 之后,登陆以后,不管运行任何命令,总是提示这个

step 1: SET PASSWORD = PASSWORD('your new password');

step 2: ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;

step 3: flush privileges;

完成以上三步退出再登,使用新设置的密码就行了,以上除了红色的自己修改成新密码外,其他原样输入即可

出现这个问题的原因是:密码过于简单。刚安装的mysql的密码默认强度是最高的,如果想要设置简单的密码就要修改validate_password_policy的值,

validate_password_policy有以下取值:

 

Policy Tests Performed
0 or LOW Length
1 or MEDIUM Length; numeric, lowercase/uppercase, and special characters
2 or STRONG Length; numeric, lowercase/uppercase, and special characters; dictionary file

 

如果要修改这个值,

1、先登入到mysql

mysql error You must reset your password using ALTER USER statement before executing this statement.

2、设置安全级别

mysql error You must reset your password using ALTER USER statement before executing this statement.

3、默认密码长度为8,可以设置为其它值,最小4位

mysql error You must reset your password using ALTER USER statement before executing this statement.

4、设置新密码,刚安装完的mysql必须设置新密码(应该是从5.5版本开始)

mysql error You must reset your password using ALTER USER statement before executing this statement.

 

相关文章: