Hi folks:
I need to give a special user admin rights to the databases he
creates.
As there is no dedicated MySQL database server for his needs yet, we
created a special user on a multi-purpose MySQL server; this special
user has the rights to do everything only on databases he creates.
To distinguish his databases among others, we require his databases'
names to be prefixed by "PNCC_". Here's how we did the trick:
Once logged in as DBA:
mysql> GRANT ALL ON PNCC_.* TO fr**@my.fqdn.com IDENTIFIED BY
'some_password' WITH GRANT OPTION;
(The query ran OK)
mysql> UPDATE db SET Db='PNCC_%' WHERE db='PNCC_';
(The query ran OK)
(We had to do two different commands, as GRANT does not seem to accept
wildcards).
From now on, after having flushed privileges, user fr**@my.fqdn.com
can create databases with names prefixed by "PNCC_", create tables
within these databases, and populates them.
But this user would like to have the possibility to create users with
special privileges on the databases/tables he previously created. The
question is: how can I grant fred to create users with rights ONLY on
PNCC_<some name> databases, and nothing else (ie. no access to other
databases, nor on mysql.*)? Do I need to insert a special row within
mysql.user? If so, which one?
Thank you very much for your help.
Regards,
Fred.