On Wed, 16 Apr 2008, Daniel Brown wrote:

On Tue, Apr 15, 2008 at 9:03 AM, Hiep Nguyen <[EMAIL PROTECTED]> wrote:
hi all, i have an existing database (internal) with a user named 'admin',
everything works fine as far as privileges concern.

 i just created a new database (test) and want to grant admin's privileges
on test as same as internal.

 how do i do this???

 i tried (as root):

 grant all on test.* to 'admin'@'localhost';
 grant all on test.* to 'admin'@'10.0.0.%';

   GRANT ALL PRIVILEGES ON test.* TO 'admin'@'localhost' IDENTIFIED
BY 'passwordString';
   GRANT ALL PRIVILEGES ON test.* TO 'admin'@'%' IDENTIFIED BY
'passwordString';
   FLUSH PRIVILEGES;

   The first query grants all privileges to admin when accessing the
host locally.  The second query allows you to connect from ANY host.
The third query flushes the old privileges data and ensures that the
updated mysql.users information is used.  Be sure to replace
passwordString with your password.

   If you only want access to be on the Class C private network
subnet for 10.0.0.x (RFC 1918) as well as localhost, then adjust query
#2 to:

   GRANT ALL PRIVILEGES ON test.* TO 'admin'@'10.0.0.%' IDENTIFIED BY
'passwordString';

   .... and then FLUSH PRIVILEGES; again.

i understand all of these, but let me re-state my question:

assume user admin has a few privileges (which i don't know, but can find out) on internal database.

let say that i create a new database and want to grant admin's privileges on test so that admin's privileges on internal = admin's privileges on test

instead of find out what are privileges of admin on internal (select, update, insert,..) and then

grant select,update, insert,... on on test.* to 'admin'@'localhost' identified by 'password';

is there any command that can set so that admin's privileges on internal = admin's privileges on test???

what i'm trying to avoid is manually adjust admin's privileges on test if admin's privileges on internal changed.

if it's not still clear, then stupid me....never mind.

t. hiep

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to