This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Error from MySql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Error from MySql" Watch "Error from MySql" New topic
Author

Error from MySql

muthu muruges
Ranch Hand

Joined: Feb 28, 2003
Posts: 70
java.sql.SQLException: Data source rejected establishment of connection, message from server: "Host '10.200.16.237' is not allowed to connect to this MySQL server"

I am getting the above error when I am trying to access the MySql database which is running in a linux machine. My JDBC code is running in windows 2K machine. Mine is an application only not an applet.

Please let me know how to solve this problem.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30130
    
150

Muthu,
Do you have a firewall on the linux box?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
muthu muruges
Ranch Hand

Joined: Feb 28, 2003
Posts: 70
Thanks for the update.

I solved the problem thru' privileges setup in mysql.

The query is:
grant all privileges on *.* to '<username>'@'%' with grant option;

Here the '%' means that mysql allows connection from any host.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30130
    
150

Interesting. Thanks for posting the solution.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Error from MySql
 
Similar Threads
Exceptions in Tomcat startup
"main" java.sql.SQLException: Access denied for user 'root'@'192.168.1.1' (using password: YES)
SQL Error on upgrading
SQLException with IE, MySQL, and JDBC
Java MySQL connection