Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error from MySql

 
muthu muruges
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34375
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Muthu,
Do you have a firewall on the linux box?
 
muthu muruges
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34375
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting. Thanks for posting the solution.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic