I
I
Igor S2018-06-13 18:23:10
MySQL
Igor S, 2018-06-13 18:23:10

Is it possible to set user rights only to tables if the database has not yet been created?

Greetings!
Tell me, is it possible to create a user and give him the rights to change / create tables in databases that have not yet been created? Well, that is, I make such a role, and as soon as a new database is created, the user can create tables in it.
Or is it still nonsense, and you need to do it every time
grant all on `newdb`.* to ...;

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Nikulshin, 2018-06-13
@xasya89

It is possible to create the rights and then bases. Just needgrant all on *.*

I
Igor S, 2018-06-13
@xarek1986

yes, I know that it is possible to set the rights to the db1 bag before it is created.
And if I still don’t know what the base will be called, I know that you can set the rights for the template, for example, it gratn all on `temp%`.* ....will give rights to all bases starting with temp, but the construction gratn all on `%`.* ....doesn’t work, it works more precisely, but not as it should

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question