mysql5.7 password expiration problem

Error:
ERROR 1862 (HY000): Your password has expired The log in the To Change the MUST IT you a using expired The A Client that the Supports Passwords..
Translation:
error 1862 (HY000): Your password has expired. Login must change it to use a client that supports an expired password.

Solution:
1. Enter the method ignores the authorization table MySQL 
 vi /etc/my.cnf
[mysqld]
Skip-Grant-the Tables
:! WQ save and exit #
2, enter mysql, view details of the root user
#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: Y
Create_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: N
1 row in set (0.00 sec)

3, but the change of password_expired

  User SET = password_expired Update 'N' = User WHERE 'the root';
        > the flush privileges;
        > quit
the /etc/my.cnf the skip-grant-tables Comment out
5 to restart the service
 #service MySQL the restart
. 6, again landing mysql to normal

Guess you like

Origin blog.51cto.com/403573/2425857