Bug #107948 Custom error log path prevents Network Service account from starting server
Submitted: 22 Jul 2022 16:12 Modified: 21 Nov 2022 19:39
Reporter: Jose Ramirez Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL for Windows: Installer Severity:S2 (Serious)
Version:1.6.4 OS:Any
Assigned to: CPU Architecture:Any

[22 Jul 2022 16:12] Jose Ramirez
Description:
It has been identified that setting a custom error log path to a custom location to which NETWORK SERVICE account doesn't have write access will cause the MySQL Windows Service to not start.

How to repeat:
1. Run a normal MySQL Server 8.0 installation and configuration.
2. Enable "Show Advanced and Logging Options" in the "Type and Networking" configuration page.
3. Configure MySQL Server as a Windows Service by NOT modifying the default values in the "Windows Service" configuration page.
4. Select a custom path in the "Error" log file textbox. The path must be a location where the "Network Service" account doesn't have write access to. E.g. C:\Users\<user_name>\Downloads.
5. Click the "Execute" button in the "Apply Configuration" page.
6. The configuration will stall with message "Attempting to start service MySQL80...".

Suggested fix:
For any of the files that can be specified in the "Logging Options" page, identify if MySQL Server will run as a service, if that is the case identify the account it will run with (E.g. Network Service). If the account doesn't have write access to that location, create the file and modify the file's permissions with the correct access.
[2 Aug 2022 1:32] Randy A
I would also point out that it doesn't matter where you select to put the log file.  After the installation MySQL just creates another one where it wants it and ignores your selection.  

As far as suggested fixes, if the user selects (leaves default) to run MySQL as a service, DON'T ALLOW THE ERROR LOG LOCATIONS TO BE CHANGED.  Again, MySQL just ignores the selection after installation anyway.
[17 Nov 2022 16:53] Jose Ramirez
Posted by developer:
 
Correct permissions are now assigned for the selected Network Service account to access the server log files.
[21 Nov 2022 19:39] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Installer 1.6.5 release, and here's the proposed changelog entry from the documentation team:

A custom error log path set to a location that the NETWORK SERVICE account
does not have write access to could prevent the Windows service from
starting.

Thank you for the bug report.