469,111 Members | 1,964 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,111 developers. It's quick & easy.

How can I give a user dba privileges?

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.
Jul 19 '05 #1
0 1755

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jani Tamminen | last post: by
4 posts views Thread by Feldman Alex | last post: by
1 post views Thread by Taber, Mark | last post: by
2 posts views Thread by Ray Muforosky | last post: by
1 post views Thread by menoquindici | last post: by
33 posts views Thread by JamesB | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by kglaser89 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.