As a little addition to that:

localhost needs to be given extra rights, because localhost will always 
use socket connections instead of TCP.

Yat-Shing Tam wrote:

>Hi Mihail,
>
>    I have done the flushing before trying to connect and it didn't work.  I
>try the show command and nothing unusal from what it reported.
>
>Regards,
>Michael
>
>----- Original Message -----
>From: <[EMAIL PROTECTED]>
>To: "Yat-Shing Tam" <[EMAIL PROTECTED]>
>Cc: "MySQL Mailing List" <[EMAIL PROTECTED]>
>Sent: Wednesday, July 17, 2002 10:23 PM
>Subject: Re: MySQL Privileges Question
>
>
>  
>
>>Did you try:
>>
>>FLUSH PRIVILEGES;
>>
>>Also, to see what user can do with his permissions you can try this:
>>
>>SHOW GRANTS FOR username;
>>
>>
>>Mihail
>>
>>Quoting Yat-Shing Tam <[EMAIL PROTECTED]>:
>>
>>    
>>
>>>Hi fellows,
>>>
>>>    I have a MySQL privileges question and hope someone can provide some
>>>input on it.
>>>
>>>    I have setup a user who can access only one db, say 'DB1'.
>>>    About the privileges, I set the account privilege like this:
>>>    1) In user table, this account has Host='%' User='user_name'
>>>Password='pwd' and all other privileges are set to 'N'.
>>>    2) In db table, this account has Host='%' Db='DB1' User='user_name'
>>>      
>>>
>and
>  
>
>>>all other privileges are set to 'Y' EXCEPT grant_priv.
>>>
>>>    Through MySQL Front GUI, the user login and is allowed to access
>>>      
>>>
>'DB1'
>  
>
>>>only and other dbs are not visible to this user.  Very things look good
>>>      
>>>
>at
>  
>
>>>this point, however, when I have a piece of java code try to access
>>>      
>>>
>'DB1'
>  
>
>>>with this user account through MM.MySQL JDBC I receive  an access deny.
>>>
>>>    Questions:
>>>    1) Why it behaves like this?  I thought if I can access through GUI
>>>application with this account, I should have the same access through
>>>      
>>>
>JDBC.
>  
>
>>>    2) Does this mean I have to use an account which has a global access
>>>privilege(s) in order to access the db through JDBC??
>>>
>>>Any input would be appreciated.
>>>
>>>Best regards,
>>>Michael
>>>      
>>>
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>  
>

-- 
Ralf Narozny
SPLENDID Internet GmbH & Co KG
Skandinaviendamm 212, 24109 Kiel, Germany
fon: +49 431 660 97 0, fax: +49 431 660 97 20
mailto:[EMAIL PROTECTED], http://www.splendid.de




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to