【MySQL】MySQL Troubleshooting

Posted by 西维蜀黍 on 2019-11-04, Last Modified on 2022-04-01

Your password has expired.

Description: Your password has expired. To log in you must change it using a client that supports expired passwords.

Solution

情况一:如果是本机的mysql过期。

请使用root用户命令行登录(从命令行登录不存在过期)。

登陆后直接输入:

> set password = password('123456');

再次使用客户端访问,发现可用。

情况二:如果是服务器mysql过期。

这种情况需要修改指定用户的password。

以root@% 为例:

> set password for 'root'@'%' = password('123456');

再次使用客户端访问,发现可用。

ERROR 2003 (HY000): Can’t connect to MySQL server on ‘…’ (61)

Refer to https://swsmile.info/post/mysql-allow-remote-access/

Reference