Let’s see how we can secure MySQL at operating system level:
> Install MySQL as root user.
> The mysqld process/service must not run as root user.
> Create a separate user (mysqluser) for MySQL and do not allow direct login access to this user.
> Restrict access to MySQL data directory to mysqluser only.
> MySQL database should not be publicly accessible.
> MySQL logs should be in a separate directory so other users can view logs.