The problem popped up the day before yesterday and took a lot of time to solve. Write it down. I hope it’ll give you shelter
Origin of the problem:
On Saturday, mysql was running properly on Windows. On Sunday morning, I tried to connect to mysql using Navicat.
Investigation record:
1 first, the blogger went to check whether the local Mysql service was started. After checking, it was found that the Mysql service was shut down and could not be started.
2 To determine the cause of Mysql service failure, check the system log.
Can’t open and lock privilege tables: Table ‘mysql.user’ doesn’t exist
4. Looking up the data on the Internet, regarding the solution of this problem, combined with the error information, it is believed that the user table in the default Mysql library is lost.
5 In the Mysql installation file, open the Mysql configuration file my.ini
6 through the configuration file, it is found that the data stored in the Mysql database is in the folder on disk C. Click the file to see that the folder contains multiple database names, but the user table data is missing in the Mysql database. At this point, all the problems have been identified.