Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

can't connect to MySQL server with JDBC

2 views
Skip to first unread message

David Bertolo

unread,
Jul 1, 2002, 12:03:11 PM7/1/02
to
Hello

I'm trying a lot of thing found in other post and nothing help me.

I'm trying this:

Driver driver = (Driver)Class
.forName("org.gjt.mm.mysql.Driver")
.newInstance();

Connection conn = DriverManager
.getConnection("jdbc:mysql://localhost:3306/test",
"davidb", "toto");

and I obtain this:
java.sql.SQLException: Server configuration denies access to data source
at org.gjt.mm.mysql.MysqlIO.init(Unknown Source)
at org.gjt.mm.mysql.Connection.connectionInit(Unknown Source)
at org.gjt.mm.mysql.jdbc2.Connection.connectionInit
(Unknown Source)
at org.gjt.mm.mysql.Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at jdbc.Main.<init>(Main.java:39)
at jdbc.Main.main(Main.java:84)


I don't think it's a problem of GRANT because I'm can use MySQL client
to do the same thing.

Please, anyone can help me?

Guozheng Ge

unread,
Jul 1, 2002, 11:04:56 PM7/1/02
to
Maybe you haven't grant the right of accessing your MySQL db for "davidb"
with the password "toto". Please check that. That's my 2 cents.


guozheng

0 new messages