Google Groups unterstützt keine neuen Usenet-Beiträge oder ‑Abos mehr. Bisherige Inhalte sind weiterhin sichtbar.

can't connect to MySQL server with JDBC

2 Aufrufe
Direkt zur ersten ungelesenen Nachricht

David Bertolo

ungelesen,
01.07.2002, 12:03:1101.07.02
an
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

ungelesen,
01.07.2002, 23:04:5601.07.02
an
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 neue Nachrichten