Home >Database >Mysql Tutorial >What should I do if I forget mysql password?
The solution to the forgotten mysql password: first open cmd and close the mysql service; then enter the mysql environment and find the user table; finally execute the update statement to modify the database password.
#The operating environment of this article: windows10 system, mysql 5.7, thinkpad t480 computer.
First open the cmd command line, execute the net stop mysql command, and turn off the mysql service first
Then execute the mysqld --skip-grant-tables command
Then enter mysql directly to enter the editing environment
##Then enter the show databases command and select the mysql databaseThen enter the show tables command to find the user table Finally execute the update statement to change the root password. Free video tutorial:
The above is the detailed content of What should I do if I forget mysql password?. For more information, please follow other related articles on the PHP Chinese website!