How to delete the root user or root permission by mistake in MySQL _ MySQL

Source: Internet
Author: User
How to delete the root user or root permission in MySQL by mistake: bitsCN.com
Some time ago, I accidentally deleted the Root user of Mysql. Unfortunately, I couldn't log on to Mysql. I 've been looking for a solution. I also read what I said on the Internet: 1. first kill the mysqlld process, add the -- skip-grant-tables parameter to open mysqlld, insert the root user 2. find the default user configuration information created when installing mysql in ubuntu, the address is/etc/mysql/debian. cnf. Therefore, you can use this user to log on, create a new root user, and grant permissions. However, these two methods failed to be tested. maybe they tried to do this in a Linux system, but it was not very reliable in Windows, and finally found another method, 3. turn off the Mysql service and find the Root Data folder on the other machine. the Mysql folder user under data is not deleted. frm, user. MYD, user. three MYI files, overwrite the same Data folder, and restart root to log on normally.
Author: aoyi dance bitsCN.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.