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

How to recover the administrator password in mysql

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article to share with you is about how to recover the administrator password in mysql, Xiaobian think it is very practical, so share it with you to learn, I hope you can gain something after reading this article, not much to say, follow Xiaobian to see it.

1. Send kill command to mysqld server to shut down mysqld server(not kill -9). The file where the process ID is stored is usually in the directory where MYSQL is located/var/lib/.

# killall -TERM mysqld

Use the--skip-grant-tables parameter to start mysqld.

# /usr/bin/safe_mysqld --skip-grant-tables

The path is not necessarily the same, you can use locate to find it.

3, and then you can log in to mysqld server without a password, at this time Mysql password and just installed the same, are empty. Now we can use mysqladmin to change mysql passwords.

#mysqladmin -u root -p password newpassword

4. Load the permission table and use the following command

# mysqladmin flush-privileges

The above is how to recover the administrator password in mysql. Xiaobian believes that some knowledge points may be seen or used in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

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