Don't know if this is the problem, but your grant looks correct..

Make sure the connection is coming from localhost..
if you make the connection from a web page, it will usually not
come from localhost and will come from the name of your website
and/or the IP of your webserver..

IE:
If your website is named www.homebrew.com, you might want to add the
grant to 'homebrew'@'www.homebrew.com', or the ip address if your site.


Hope this helps.

---------------------
Johnny Withers
[EMAIL PROTECTED]
p. 601.853.0211
c. 601.209.4985 

-----Original Message-----
From: Søren Neigaard [mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 18, 2002 7:40 AM
To: [EMAIL PROTECTED]
Subject: Am I asking the wrong question?


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?

Heres my "old" question.

Please I need some help here, I don't think I understand the "rights"
architecture in MySQL.

I'm trying to connect like this:

Connection conn =
DriverManager.getConnection("jdbc:mysql://localhost:3306/homebrew?user=h
omebrew&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 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          |
+-------------+----------+------------------+-------------+-------------
+-------------+-------------+-------------+-----------+-------------+---
------------+--------------+-----------+------------+-----------------+-
-----------+------------+

--
Med venlig hilsen/Best regards,
 Søren Neigaard mailto:[EMAIL PROTECTED]
--
 "Mind what you have learned. Save you it can."


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


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