java.sql.SQLException: Server configuration denies access to data source
843854Apr 23 2004 — edited May 19 2004I 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