Solution to phpmyadmin forgetting password:
First step: Find and install MYSQL my.ini file in the directory. For example, my location is: D:\wamp64\bin\mysql\mysql5.7.14
Find the location in the picture and add the statement to save: skip_grant_tables
or
Very useful mysql startup parameter——--skip-grant-tables.
As the name suggests, grant-tables, the authorization table, is not started when starting mysql. what's the function? Of course it is useful after forgetting the administrator password.
Then restart the service and start wampserver
Second step:Open cmd, enter the bin directory of mysql, enter mysql -uroot -p and press Enter as shown below:
No need to enter the password, then press Enter, as shown in the picture:
cmd appears as shown above, which means successful entry.
Step 3: Reset password
Enter update mysql.user set password=password('root') where user='root';
Enter and restart wamp to change the password successfully
#tips:
1. If it appears in the third step: prompt ERROR 1054 (42S22) : The error of Unknown column 'password' in 'field list' is because the MYSQL version is too high.
Change the statement in the third step to: update mysql.user set authentication_string=password('root') where user ='root' ; that's it
2. After the modification is successful, remember to delete the skip_grant_tables added in the first step, otherwise an error may occur
Recommended learning: phpmyadmin tutorial
The above is the detailed content of What should I do if phpmyadmin forgets my password?. For more information, please follow other related articles on the PHP Chinese website!