Home  >  Article  >  Database  >  What should I do if mysql8 phpmyadmin password login fails?

What should I do if mysql8 phpmyadmin password login fails?

藏色散人
藏色散人forward
2021-04-14 10:29:272032browse

What should I do if mysql8 phpmyadmin password login fails?






## Help those in need!

mysql8 phpmyadmin password login failed On the cloud server, the configuration is complete After mysql, the deployment of phpmyadmin was completed, but I could not log in after entering the account and password on the web page. Later I found out that it was caused by the inconsistent password policy of mysql8 In the old version, mysql_native_password 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!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete