V
V
Vi Vola2018-12-26 15:27:00
MySQL
Vi Vola, 2018-12-26 15:27:00

How to create a user in mysql with the ability to give rights only to certain users?

The task is to organize the following structure of user interaction on the server.
There is a [email protected] user who can do everything except work with files (and perhaps a few more critical features are limited).
And there must be an [email protected]'%' user, which can do everything except the following:
- can't delete [email protected]
- can't change its permissions *[email protected]*
- can't create another super user
- can't work with files ( etc.)
And it's not clear to me how exactly to give rights to grant rights with restriction of granting rights to the [email protected] user. That is, the command should be something like this, but somehow you need to add a filter by users: I did not find an answer in Google.
GRANT ALL ON *.* TO 'admin'@'%' WITH GRANT OPTION;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Syomov, 2018-12-26
@hakain

This can only be done by writing a layer that admin will use, and which will check this work scenario, and have a set of commands for managing users. By means of mysql itself, this is not implemented.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question