Home  >  Article  >  Database  >  What should I do if phpmyadmin forgets my password?

What should I do if phpmyadmin forgets my password?

青灯夜游
青灯夜游Original
2019-12-30 13:47:268431browse

What should I do if phpmyadmin forgets my password?

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

What should I do if phpmyadmin forgets my password?

or

What should I do if phpmyadmin forgets my password?

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: What should I do if phpmyadmin forgets my password?

No need to enter the password, then press Enter, as shown in the picture:

What should I do if phpmyadmin forgets my password?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn