Bug #104509 MySQL fails to start if my.ini file is encoded as UTF-8-BOM
Submitted: 2 Aug 19:00 Modified: 8 Sep 13:10
Reporter: Sergio Henrique Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Windows Severity:S3 (Non-critical)
Version:8.0.26 OS:Microsoft Windows (Server 2019 Standard)
Assigned to: CPU Architecture:x86

[2 Aug 19:00] Sergio Henrique
Description:
If the my.ini file is encoded as UTF-8-BOM instead of UTF-8, the service will fail to start. Furthermore, Microsoft Notepad quietly saves the file as UTF-8-BOM, even if there was no modification.

How to repeat:
1. Install a fresh copy of Windows Server 2019 Standard Edition.
2. Install MySQL (the latest version at the time of writing is 2.0.26).
3. Open my.ini in Microsoft Notepad, then click File, then Save.
4. Restart MySQL service.

Suggested fix:
MySQL service would be more resilient if it read the my.ini file even if it was in UTF-8-BOM encoding.
[8 Sep 13:10] MySQL Verification Team
Hello Sergio Henrique,

Thank you for the bug report.
Imho this is duplicate of Bug #95293, please see Bug #95293.

Regards,
Ashwini Patil
[8 Sep 13:11] MySQL Verification Team
Quoting a note from https://dev.mysql.com/doc/refman/8.0/en/charset-unicode.html

"MySQL uses no BOM for UTF-8 values. "