The MySql service stops after starting, and the solution to the failure to start the service

After modifying the configuration file my.ini of mysql today , after restarting the MySql service, it prompts that the mysql service stops after starting. Some services are not started by other services or programs.
insert image description here

Because everything is normal in the local environment test, but it doesn’t work as soon as it reaches the server. Obviously, only one configuration item was changed, so I changed the configuration item back, restarted the service, and found that it still didn’t work.

According to Baidu, the most common solution is to delete the data folder, and then re-initialize mysql... What's worse, many bloggers don't make it clear that the data folder is the source data of the database. Delete it and clear the entire library, okay? A bunch of people clapped their hands and applauded, success, success! Success is success, all the data is successful... at least remind people to back it up...

Moreover, it would take a long time to think about the online data backup, which is obviously unrealistic. My mind was buzzing, so I changed a configuration file, and mysql hung up . . The encoding of ini is related ! Saving the file will convert the source file according to the default encoding!

Back up a copy of my.ini, then open my.ini, save it as, adjust the encoding to ANSI, save the overlay, restart the service , and it succeeded. For this broken problem, I hung up online for 30 minutes and suffered heavy losses. I recorded this solution, hoping to help more people.
insert image description here

Guess you like

Origin blog.csdn.net/hangsky1990/article/details/131948604