I wanna log every action operated on the database so I have followed the instructions here to configure my.ini and enabled the audit logging of MySQL Server 5.7
Audit logging function normally but it will be changed to unknown ownership after a random time. It showed "You do not have permission to open this file. See the owner of the file or an administrator to obtain permission." as below. (I am using the admin account of this PC)
Also, it said "You do not have permission to view or edit the object's permission settings" in the file properties as below.
Before this issue occurred I have tried to
- change the UAC setting of my PC to the Lowest options. UAC setting
- update the [file properties > security > advanced]'s Owner and permission entries to my admin account file properties
But no luck.
however, when I restarted the MySQL service, it recovered the file permission but all the log records were deleted.
Here is my.ini config:
# Audit Logging settings
server_audit_logging="ON"
server_audit_incl_users=admin,root
server_audit_events="QUERY,TABLE"
server_audit_file_path="D:\BDC\logs"
server_audit_file_rotate_now=ON
server_audit_query_log_limit =5120
server_audit_file_rotate_size=1000000000
server_audit_file_rotations=5
Perhaps this issue is occurred by The MySQL services is log on as Network Service?
Is there any configuration that I can set to fix the permission of output audit logging file to the local admin account?
Please help.