After modifying the MySQL configuration file my.ini, the mysql service cannot be restarted.
环境: Windows 场景: If you want to modify the maximum number of connections to the database, first pause the mysql service. Double-click to open the C:\ProgramData\MySQL\MySQL Server 8.0\my.ini file in Notepad mode by default, and modify the value of max_connections. After the modification is completed, notepad is closed directly. When I tried to restart the MySQL service, the following error occurred - the MySQL80 service on the local computer started and then stopped. Some services will automatically stop when they are no longer used by other services or programs.
Solution:
(1) First open the my.ini file with Notepad
(2) Click File > Save As, select ANSI encoding, and replace the original file