Java JDBC local,remote connection error
Posted by: David Dobson
Date: October 01, 2010 03:26PM

Hi Everyone

I have been developing a Java based system to monitor a number of computers of a local network. To do this I have a simple Java application (with JDBC connectivity) that updates a database every 60 seconds with the information about the specific client the java application is running on.

This all works fine, however when I come to run the same application on the server that holds the MySQL database I got the following error:

SEVERE: null
java.sql.SQLException: Data source rejected establishment of connection, message from server: "Host '192.168.1.9' is not allowed to connect to this MySQL server"
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:650)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1808)
at com.mysql.jdbc.Connection.<init>(Connection.java:452)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
at java.sql.DriverManager.getConnection(DriverManager.java:620)
at java.sql.DriverManager.getConnection(DriverManager.java:200)

I believe it may have something to do with the mySQL setting 'bind-address' settings (which is currently set to 192.168.1.9).

Any suggestions would be greatly appreciated :)

David

Options: ReplyQuote


Subject
Written By
Posted
Java JDBC local,remote connection error
October 01, 2010 03:26PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.