473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1894

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gary | last post by:
Hello guys! Bear with me,I am newbie. I am trying to limit the privileges of the user PUBLIC has as toughly as possible which means I want to go as far as I can then leave those MUST-HAVE...
1
by: Jani Tamminen | last post by:
We run DB2 UDB v8.1 on Windows. How do I find the list of all users that have the following privileges: 1. User Data Maintenance 2. System Tabale Maintenance
4
by: Feldman Alex | last post by:
Hi all, I need to know the user privileges (does user have administrator privileges) .. Which c# api's should i use? Thanks a lot
1
by: Taber, Mark | last post by:
I posted this earlier, and got no responses. While using pg_dump and pg_restore (or attempting to restore, more precisely), the process failed because of a missing user, user '128'. I never...
2
by: Ray Muforosky | last post by:
Hello everyone. I created a new user with the grant command and yet, I can't login into the database I must mention that the user was created but all the privileges are set to 'N'. This is...
1
by: menoquindici | last post by:
We have a situation here where one of my co-workers removed several privileges from the 'root' user, namely: INSERT UPDATE DELETE FILE
5
by: Martijn Saly | last post by:
I'd like to test in my script, if it's going to be possible to enable priviliges. If I use this... netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect") ....it presents a...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
11
by: giddy | last post by:
hi, (I want someone to check if my idea is utterly stupid or ok??) I have a mid complex app for a hotel that needs a fine grained user security system. In other words an admin should be able...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.