Home  >  Article  >  Database  >  The solution to the forgotten root password of Mysql

The solution to the forgotten root password of Mysql

高洛峰
高洛峰Original
2016-12-02 14:12:531172browse

If you forget the MySQL root password, you can reset it using the following method:

1. KILL the MySQL process in the system as follows:

a. Click on the desktop toolbar to open the taskbar manager.

b. Find the mysqld-nt.exe process from the Task Manager process, right-click and select End Process.

2. Enter the command mysqld-nt --skip-grant-tables on the command line to start MySQL without checking permissions;

3. Then open another window and use root with an empty password User logs in to MySQL;

4. Modify the password of the root user;

mysql> update mysql.user set password=PASSWORD (new password) where User=root;
mysql> flush privileges;
mysql> quit


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