InformationWhen created, the MySQL user may have interactive access to the operating system, which means that the MySQL user could login to the host as any other user would.
Preventing the MySQL user from logging in interactively may reduce the impact of a compromised MySQL account. There is also more accountability as accessing the operating system where the MySQL server lies will require the user's own account. Interactive access by the MySQL user is unnecessary and should be disabled.
This setting will prevent the MySQL administrator from interactively logging into the operating system using the MySQL user. Instead, the administrator will need to log in using one's own account.
SolutionExecute one of the following commands in a terminal:
usermod -s /bin/false mysql
usermod -s /sbin/nologin mysql