mysql5.7密码修改

  1. 查看临时密码:
[root@god ~]# grep password /var/log/mysqld.log 
2020-09-11T10:58:46.152697Z 1 [Note] A temporary password is generated for root@localhost: p(-Jp)6d!4RW
  1. 登录mysql(复制刚才的临时密码)
[root@xuegod69 ~]# mysql -uroot -p
Enter password: 
  1. 修改mysql密码策略
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)

mysql>  set global validate_password_length=6;
Query OK, 0 rows affected (0.00 sec)
  1. 修改mysql密码
mysql> SET PASSWORD FOR root@localhost=PASSWORD(‘123456‘);
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql5.7密码修改

上一篇:oracle 12541 TNS 无监听程序


下一篇:ADB命令