About MySQL 1058 error

When I used MySQL a few days ago, it was still normal, but today I find that MySQL can’t be started. The prompt of using net start MySQL command is as follows:

   

Then I found that there was no MySQL content in the registry, and the MySQL service could not find the path. So mysqld – remove, the MySQL service was deleted successfully, and then mysqld – install, but it prompted that the MySQL service already existed. Next, I use the net start MySQL command. This time, the prompt becomes error 1058, that is, the service cannot be started. The reason may be that the service has been disabled or the device associated with it has not been started.

Then, through Baidu found a solution, in the MySQL configuration file, my name is my.ini Add the following content to the configuration file:

Finally, the service mysqld – install is re installed to prompt that the service is installed successfully. Then start MySQL (net start MySQL) to run normally.

Read More: