Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What should I do when the MySQL password expires

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces you how to do when the MySQL password expires. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

1. Error message

ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords

2. Solution

(1) stop MySQL database

(2) start the mysql database by ignoring the password and enter the database

Add the skip-grant-tables parameter to [mysqld] in the my.cnf file

(3) enter the mysql library in MySQL (this command is a multi-instance entry command)

[root@host1 data4] # mysql-S / tmp/mysql.sock2

Welcome to the MySQL monitor. Commands end with; or\ g.

Your MySQL connection id is 3

Server version: 5.7.16-log MySQL Community Server (GPL)

Copyright (c) 2000, 2013, 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 >

(4) set password_expired to never expire

Mysql > update user set password_expired= "N" where user= "root"

Query OK, 1 row affected (5.06 sec)

Rows matched: 1 Changed: 1 Warnings: 0

(5) after exiting, close MySQL and log out the skip-grant-tables parameter in my.cnf

Reconfigure the password after entering the mysql database

About what to do about the expiration of the MySQL password to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report