Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Several Solutions of Mysql forgetting password

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Solution 1

Uninstall completely, delete all data, close all processes related to MySql first, enter taskkill / f / im mysqld-nt.exe on the command line (cmd)

Then find the root directory of MySql and delete it.

Solution 2

Output or change the password on the command line

. Run on the command line: taskkill / f / im mysqld-nt.exe

The following operation is to operate some programs in the bin directory in mysql. If you have not configured the environment variables, you need to change to the bin directory in mysql to execute the following statements. Otherwise, it's invalid.

. Continue to run on the command line: mysqld-nt-- skip-grant-tables

3. Open a new command line to run: mysql-u root (if you do not configure the bin environment variable for mysql, you need to change to the bin directory to execute this statement)

If you don't want to change the password, you just want to see the original password. You can execute this statement on the command line

Users and passwords can be viewed by select host,user,password from mysql.user;//

If you want to change the password, execute the following statement under the command line

Update mysql.user set password=', fill in the password you want to set 'where user='root'' here.

After you have completed these operations, continue to run on the command line

For the sake of taskkill / f / im mysqld-nt.exe;// security, it ends first, because now it is possible to start the mysql service with net start mysql;// logged in directly with mysql-u root.

At this point, mysql's root password forgetting solution is done.

Summary

The above is the whole content of this article. I hope the content of this article has a certain reference and learning value for everyone's study or work. Thank you for your support. If you want to know more about it, please see the relevant links below.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report