This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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: 30050
    
149

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: 30050
    
149

Interesting. Thanks for posting the solution.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error from MySql
 
Similar Threads
"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
Exceptions in Tomcat startup