Cannot enter phpmyadmin error # 1862 - Your password has expired

I installed mysql, php and phpmyadmin after this tutorial . Evrything works well, i.e. I can start and connect to mysql via the command line without any errors, but the problem is that when I try to enter phpmyadmin, I get this error:

# 1862 - Your password has expired. To log in, you must change it using a client that supports expired passwords.

Perhaps it’s worth saying that my current mysql password is not temporary, which I received when I installed mysql, but I changed it later (before installing phpmyadmin), and now try to enter phpmyadmin with this new (current) password, it shows the error above .

Can someone please help me understand what the problem is?

thanks

+8
mysql login phpmyadmin
source share
3 answers

Well, finally, I did not understand what was the cause of this problem, but the following solution worked for me:

  • Enter this in the terminal (in / usr / local / mysql / bin /) mysqladmin -u root -p password
  • Enter your password
  • Enter a new password

  • Done! Then I could login with phpmyadmin!

Hope this helps others who have similar problems,

+13
source share

MySQL password expired

From MySQL 5.7.4, the default value for default_password_lifetime is 360 (per year). If you do not make any changes to this variable or individual user accounts, all user passwords will expire after 360 days (so you get: β€œYour password has expired. To log in, you must change it using a client that supports expired passwords ").

To prevent the password from expiring automatically, log in as root ( mysql -u root -p ):

For clients that automatically connect to the server (for example, from scripts.), Change the password expiration settings:

ALTER USER 'script'@'localhost' PASSWORD EXPIRE NEVER;

or you can disable auto-password for all users:

SET GLOBAL default_password_lifetime = 0;

The links I used to understand and fix this

MySQL: Password Expiration and Sandbox Mode
MySQL: password expiration policy
Password Expiration Policy in MySQL Server 5.7

+3
source share

This work for me:

Source: https://www.diariodeunprogramador.net/fallo-al-conectar-mysql-your-password-expired/

Log in as root: mysql -u root -p

and then you deactivate the automatic expiration of passwords for all users: SET GLOBAL default_password_lifetime = 0;

0
source share

All Articles