1.查看初始密码:
[root@VM_225_102_centos ~]# grep 'temporary password' /var/log/mysqld.log
2016-07-08T02:25:46.311098Z 1 [Note] A temporary password is generated for root@localhost: MtPqF0/oN5zo
mysql>
set
global
validate_password_policy=0;
Query OK, 0
rows
affected (0.00 sec)
mysql> set global validate_password_policy=0; 策略设为0,表示只检查密码长度
mysql> set global validate_password_length=6; 默认密码长度为6
mysql> alter user root@"localhost" identified by '123456'; 修改完成
发表评论