Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.sql.SQLException: Server configuration denies access to data source

843854Apr 23 2004 — edited May 19 2004
I can see that this has been up previously alot but I can't find any answers of use in the other threads.

I get the error:

java.sql.SQLException: Server configuration denies access to data source
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:537)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1585)
at com.mysql.jdbc.Connection.<init>(Connection.java:524)
at com.mysql.jdbc.Driver.connect(Driver.java:359)
at java.sql.DriverManager.getConnection(DriverManager.java:537)
at java.sql.DriverManager.getConnection(DriverManager.java:209)
at CServer.<init>(CServer.java:61)
at CServer.main(CServer.java:13)

on the current server I'm developing upon. The code I'm using worked on my own server in another app so I'm confused as of why it doesn't work on this server. The mysql db/username/passwor are fully working from the shell.

The code i use is:

try
{
//JDBC object
Class.forName("com.mysql.jdbc.Driver").newInstance();

conn = DriverManager.getConnection( "jdbc:mysql://localhost/wwwtest? user=***&password=b4G5zeKM");


}


catch (Exception e)
{
e.printStackTrace();
System.out.println("Bugger3");
}


Why doesn't this work?

Thx
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 16 2004
Added on Apr 23 2004
3 comments
175 views