7

After installing MySQL 8.0 I made some changes to the my.ini file and the service failed to start. I reverted the changes and MySQL 8.0 would still not start. I then uninstalled and reinstalled. MySQL started with the new install. This time I decided to make a backup of the MySQL file and then simply open the my.ini file in notepad, make no changes and just save the file. MySQL 8.0 would again start and then immediately stop with out logging errors.

I then renamed the unedited my.ini file with no changes to my.ini.bad and renamed the my.ini copy to my.ini and MySQL would start again.

I compared the differences in the files and see nothing different on the file permissions.

I can't seem to edit the file at all. Any save even without changing the file prevents MySQL from running.

Notepad is changing the filesize from 17464 to 17467 with out any editing.

How do I edit the my.ini file and also have MySQL start?

  • On a second check the files sizes are a little different. Originally I was using the Size column in File Explorer. Using the details in the file properties the file is originally 17464 bytes. After saving it in Notepad with no changes the file size is 17467. – jhersey29 Apr 4 '19 at 13:03
9

I found the ini file from mySQL has 3 invalid ANSI characters. The following line in the file is the culprit "The line # range from 1 to 2^32 − 1. “Unique” means that each ID must be different.". It has 3 Unicode characters. This is causing notepad to append the byte order mark to the text file.

Remove this comment and use Save As in Notepad. Under "Save As" change encoding to ANSI. If you don't remove the comment and then save as ANSI, Notepad will automatically replace the characters with place holders.

| improve this answer | |
  • Yeah! I must save my.ini as ANSI Encoding, if not mysql server couldn't start – HelloWindowsPhone May 6 '19 at 4:46
  • Thank you so much, this was my problem, I couldnt get the my.ini file to work no matter what I tried. This resolved the issue. – Maxim Gershkovich Feb 12 at 4:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.