This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connecting to MySQL

 
bill bozeman
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to make a connection to a mysql database. I have a database setup on some server and I have the proper driver setup. It does work when I place the class on the server by calling this:
"jdbc:mysql://localhost/db_name"
But when I try to run the samething locally like this:
"jdbc:mysql://ip_address/db_name"
I get an error saying "Bad Handshake". From this I am assuming this must be a permissions thing on the server. Can anyone confirm that and/or tell me how I can change those permissions.
Thanks,
Bill
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MySQL has an option to disallow connections from outside servers. The server needs to be configured to allow what you want. I forget how to do it, but it is in the manual at http://mysql.com
 
bill bozeman
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Thomas, I found it. Looks like you have to change the user table. Change the host field to a wildcard or a mask to allow connections from any or certain computers. Of course I don't have access to the user table, but hopefully my hosting company will open it up for me.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic