aspose file tools*
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
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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30973
    
159

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
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30973
    
159

Interesting. Thanks for posting the solution.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error from MySql