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.

-- 
</Daniel P. Brown>
Ask me about:
Dedicated servers starting @ $59.99/mo., VPS starting @ $19.99/mo.,
and shared hosting starting @ $2.50/mo.
Unmanaged, managed, and fully-managed!

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

Reply via email to