mysql5.7 Password Expiration Error 1862 (HY000): Your password has expired. To log on must change

Source: Internet
Author: User

Environment:

ubuntu14.04 mysql5.7


One, mysql5.7 password expiration issue

Error:

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

Translation:

Error 1862 (HY000): Your password has expired. Login must change it using a client that supports expired passwords.


Workaround:

1, using the method of ignoring the authorization table to enter MySQL

VI/ETC/MY.CNF [Mysqld] skip-grant-tables:wq! #保存退出

2. Go to MySQL and view the root user's details

# mysql-u root-p > Use mysql > select * from Mysql.user where user= ' root ' \g
 1. row ***************************                   Host: localhost                   User:  root           select_priv: y            Insert_priv: Y            Update_priv: Y            delete_priv: y           create_priv: y              Drop_priv: Y            Reload_priv: Y          shutdown_priv: y          process_priv: y              File_priv: Y             Grant_priv: Y        References_priv: y            index_priv:  Y            Alter_priv: Y           Show_db_priv: Y             Super_priv: Y Create_tmp_table_priv: Y       lock_tables_priv: y          execute_priv:  Y       Repl_slave_priv: Y       repl_client_priv: y      create_view_priv: y        show_view_priv : y   create_routine_priv: y    alter_routine_priv: y       Create_user_priv: Y             event_priv: y          trigger_priv:  YCreate_tablespace_priv: Y               ssl_type:            ssl_cipher:            x509_issuer:           x509_subject:         max_questions:  0           max_updates: 0        max_connections: 0  max_user_connections: 0                 plugin: mysql_native_password authentication_ String: *ac241830ffddc8943ab31cbd47d758e79f7953ea      password_expired:  n password_last_changed: 2015-11-11 16:52:49     password_ Lifetime: null        account_locked: n1 row in  set  (0.00 SEC)

3. Change the password_expired into a period

> Update user set password_expired= ' N ' where user= ' root ';        > Flush Privileges; > Quit

4, the/ETC/MY.CNF skip-grant-tables this line commented out

5. Restart Service

#service MySQL Restart

6. Log in again to MySQL is normal



---end---

mysql5.7 Password Expiration Error 1862 (HY000): Your password has expired. To log on must change

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.