MySQL 5.7 Service Fails To Start After Configuration Change


  • Share on Pinterest

After changing the MySQL 5.7 my.ini file the MySQL Windows Service hangs while starting up. Killed the mysqld.exe process with Task Manager and launched it in debug mode to see the following error message:

C:\>"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --verbose
mysqld: [ERROR] Found option without preceding group in config file C:\ProgramData\MySQL\MySQL Server 5.7\my.ini at line 1!
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

The configuration change was made with notepad.exe on Server 2016 and even after removing the configuration change, MySQL would not launch.

I used Notepad++ to change the file encoding from UTF-8-BOM to UTF-8 and tried to launch MySQL again. Success!