解决SQLyog连接mysql报错:Your password has expired

来自:博客园
时间:2024-03-09
阅读:
免费资源网 - https://freexyz.cn/

解决SQLyog连接<a href=https://www.freexyz.cn/tag/MySQL.html target=_blank class=infotextkey>MySQL</a>报错:Your password has expired

解决步骤如下:

D:\program\mysql-5.7.16-winx64\bin>mysql -uroot -p
Enter password: *******
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.16

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SET PASSWORD = PASSWORD('root123');
Query OK, 0 rows affected, 1 warning (0.00 sec)


mysql> ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

 

重新连接即可!

免费资源网 - https://freexyz.cn/
返回顶部
顶部