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 MySQL mistakenly deletes the root user or root permission?

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

Share

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

This article mainly explains "MySQL mistakenly deletes root user or root permission how to do", the explanation content in the article is simple and clear, easy to learn and understand, please follow the idea of Xiaobian slowly in-depth, together to study and learn "MySQL mistakenly deletes root user or root permission how to do"!

1. Kill the mysqlld process first, add the parameter--skip-grant-tables to open mysqlld, and insert the root user.

2. Find the configuration information of the default user created when ubuntu installs mysql, the address is/etc/mysql/debian.cnf. So log in with that user, re-create root user, and grant permissions.

However, these two methods failed to be tested. Maybe what they tried was under the system of Windows. It was not very reliable to do so under Windows. Finally, they found another method.

3. Turn off Mysql service and find the Data folder on another machine where Root has not been deleted. Under data, Mysql folder user.frm,user.MYD,user.MYI three files, overwrite the same Data folder.

Restart root normal login

Thank you for reading, the above is "MySQL mistakenly delete root user or root permissions how to do" content, after the study of this article, I believe that we have a deeper understanding of MySQL mistakenly delete root user or root permissions how to do this problem, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!

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