Home  >  Article  >  Database  >  How to solve the problem of forgetting mysql database administrator password

How to solve the problem of forgetting mysql database administrator password

小云云
小云云Original
2018-02-22 10:52:273141browse

We will use the MySQL database when programming under the Windows operating system. But sometimes, we forget the database login password? What should we do when we forget our login password and cannot enter mysql? Here we provide the modification of mysql login secret.

1. Enter the command mysqld --skip-grant-tables (prerequisite is to close the mysql.exe process net stop mysql)

2. Enter the command mysql

Complete database entry without password~

3. Change username and password

mysql -uroot -p1234

Red For places that can be changed, username and password


##Related recommendations:

Jenkins Changing Administrator Password Instance Tutorial

Recovering the MySQL administrator password under Linux

Remedies for forgetting the administrator password

The above is the detailed content of How to solve the problem of forgetting mysql database administrator 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