Information
Failure to provide logical access restrictions associated with changes to configuration may have significant effects on the overall security of the system.
When dealing with access restrictions pertaining to change control, it should be noted that any changes to the hardware, software, and/or firmware components of the information system can potentially have significant effects on the overall security of the system.
Accordingly, only qualified and authorized individuals should be allowed to obtain access to system components for the purposes of initiating changes, including upgrades and modifications.
Solution
Configure the MySQL Database Server 8.0 to enforce access restrictions associated with changes to the configuration of the MySQL Database Server 8.0 or database(s).
Check and change file permissions on the MySQL Configuration file so the mysql OS user owns and file and is the only user with read-write permissions. Use the SHOW GRANTS statements to audit who has SUPER permissions and remove any users with excess privileges.
For my.cnf, change ownership and permissions to:
File or Resource Location Owner Directory Permissions File Permissions
MySQL configuration file /etc/my.cnf root drwxr-xr-x -rw-r--r--
The mysqld-auto.cnf is created and managed by the mysql instance, as such permissions should be correct. If not correct, change 'owner' to 'mysql' and 'rw r' to '640'.