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

What if I don't remember the Root password of Mysql?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article introduces the knowledge of "how to remember the Root password of Mysql". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Start the command line first

1. 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.

two。 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.

Here I set an empty password.

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

For the sake of taskkill / f / im mysqld-nt.exe;// security, end it first, because now you can log in directly with mysql-u root.

Net start mysql;// starts the mysql service

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

This is the end of the content of "what to do if you don't remember the Root password of Mysql". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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

Development

Wechat

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

12
Report