## Help those in need!
mysql8 phpmyadmin password login failed was used for password verification, while in the new version, caching_sha2_password### was used to log in to phpmyadmin. The old version of verification is used, so I can’t log in.######The solution here is to change the password verification method to the old version### 1. Select user,host,plugin from mysql.user; View the current password account verification method (I The root here has been changed to the old version) ###+------------------+-----------+-----------------------+ | user | host | plugin | +------------------+-----------+-----------------------+ | admin | % | caching_sha2_password | | mysql.infoschema | localhost | caching_sha2_password | | mysql.session | localhost | caching_sha2_password | | mysql.sys | localhost | caching_sha2_password | | root | localhost | mysql_native_password | +------------------+-----------+-----------------------+###2, the variables of the new version are somewhat different from the old version, you can view the variables through show variables like 'validate_password%'; ###
+--------------------------------------+-------+ | Variable_name | Value | +--------------------------------------+-------+ | validate_password.check_user_name | ON | | validate_password.dictionary_file | | | validate_password.length | 6 | | validate_password.mixed_case_count | 1 | | validate_password.number_count | 1 | | validate_password.policy | LOW | | validate_password.special_char_count | 1 | +--------------------------------------+-------+###3, execute the password change of the new version## #
ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY '111111'; LUSH PRIVILEGES;### Note that the password strength of the new version is relatively high. If the value of validate_password.policy is not low, a simple password cannot be set. ######The password is too simple, causing the password change to fail. Solution###### Check the password-related settings through 2 above, mainly look at validate_password.length and validate_password.policy###
set global validate_password.policy=LOW set global validate_password.length=6### and then you can change the password. #####################
The above is the detailed content of What should I do if mysql8 phpmyadmin password login fails?. For more information, please follow other related articles on the PHP Chinese website!