How can I protect a MySQL user from deleting and modifying it?

I would like to create a MySQL user with permissions to create and delete other users, but not delete or modify my own account (superuser).

The user seems to need CREATE USERto be able to manage users, and this seems to allow all accounts to be deleted.

The goal is to provide MySQL as a service with the ability to manage some users, while maintaining the administrative user in a database protected from users.

Edit: Users will connect directly to MySQL using the mysql CLI client or a third-party database tool. Of course, this problem can be eliminated by providing the user with a user system for user management and user access control there, but I would prefer to give direct access to the database.

+3
source share
1 answer

MySQL does not provide this level of control over user management. But I can imagine a small application that will allow your authorized users to manage only those whom you allow.

. CREATE USER DROP USER , .

MySQL , .

0

All Articles