Home > Database > Mysql Tutorial > body text

What should I do if I forget mysql password?

王林
Release: 2023-01-05 16:13:32
Original
44236 people have browsed it

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.

What should I do if I forget mysql 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

What should I do if I forget mysql password?

Then execute the mysqld --skip-grant-tables command

What should I do if I forget mysql password?

Then enter mysql directly to enter the editing environment

What should I do if I forget mysql password?

##Then enter the show databases command and select the mysql database

What should I do if I forget mysql password?

Then enter the show tables command to find the user table

What should I do if I forget mysql password?

Finally execute the update statement to change the root password.

What should I do if I forget mysql password?

Free video tutorial:

mysql 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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!