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: oyi dance