Hy Soren,

Søren Neigaard wrote:

> I have tried to get through with this question two ties before, and
> since I'm not getting any replies, I'm starting to think that I must be
> asking the wrong question. What am I doing wrong then?


sometimes you need to choose a good subject, but i don't know what your 
original subject was...


> 
> Heres my "old" question.
> 
> Please I need some help here, I don't think I understand the "rights"
> architecture in MySQL.


what exacly you don't understand? the following message is just a 
special problem, not a question about understanding the permission system.


> 
> I'm trying to connect like this:
> 
> Connection conn = 
>DriverManager.getConnection("jdbc:mysql://localhost:3306/homebrew?user=homebrew&password=maaler");
> 
> But I get the following error:
> 
> SQLException: Cannot load connection class 'java.sql.SQLException: Server 
>configuration denies access to data source'.
> SQLState:     08001
> VendorError:  0



i don't know anything about jdbc and java.
did you try to connect via the mysql client to database and fire the 
same query this way?

if that works you could be more sure that your java code is somehow 
wrong, otherwise you could be more sure that it's really a permission 
problem...


> 
> I have created a database and executed the following grants:
> 
> GRANT SELECT, INSERT, UPDATE, DELETE, INDEX ON homebrew.* TO homebrew@localhost 
>identified by 'maaler' WITH GRANT OPTION;
> 
> But I'm not so sure I understand this grant stuff. If I make a "SELECT
> * FROM USER" in the MYSQL database I get the following:
> 
> 
>+-------------+----------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+
> | Host        | User     | Password         | Select_priv | Insert_priv | 
>Update_priv | Delete_priv | Create_priv |
> Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | 
>References_priv | Index_priv | Alter_priv |
> 
>+-------------+----------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+
> | localhost   | root     | 4d940be86f94e167 | Y           | Y           | Y          
> | Y           | Y           | Y      
> | Y           | Y             | Y            | Y         | Y          | Y            
>   | Y          | Y          |
> | neigaard1   | root     | 4d940be86f94e167 | Y           | Y           | Y          
> | Y           | Y           | Y      
> | Y           | Y             | Y            | Y         | Y          | Y            
>   | Y          | Y          |
> | localhost   |          |                  | N           | N           | N          
> | N           | N           | N      
> | N           | N             | N            | N         | N          | N            
>   | N          | N          |
> | neigaard1   |          |                  | N           | N           | N          
> | N           | N           | N      
> | N           | N             | N            | N         | N          | N            
>   | N          | N          |
> | 192.168.1.3 | root     | 4d940be86f94e167 | Y           | Y           | Y          
> | Y           | Y           | Y      
> | Y           | Y             | Y            | Y         | N          | Y            
>   | Y          | Y          |
> | localhost   | homebrew | 7cef02e455de0f96 | N           | N           | N          
> | N           | N           | N      
> | N           | N             | N            | N         | N          | N            
>   | N          | N          |
> 
>+-------------+----------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+
> 



 From this excerpt one cannot see if you really the right permissions, 
at least it says that user homebrew has generally no permissions which 
go over the full database.

To see if there are correct permissions check the db table ind Database 
MySQL - there you find Database specififc persmissions for each user.

Another thing that could be (but i am not sure if that applies) that you 
need to relaod the database sometimes after granting something to a user 
or adding a new user, i am not sure, but you can give it a try.

ps: i would not send original passwords to such a list - one should 
always black out things like that...


hth,
henning


---------------------------------------------------------------------
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