• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[SOLVED] - Connection to mysql using certificates

 
Alessandro Camel
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I'm trying to connect to mysql server using ssl ( the only way it accepts connections).

First of all this is my perl code:

and it works without any problem.

This is my java code :


As you can see, I'm a little confused about the values that I have to put as "javax.net.ssl.*
I have read about the java keytool utility, but I'm not sure if I have to use it! (I'm really a java newbie!!!)

Last thing: if I use verifyServerCertificate=false, I can connect to the mysql server, but I'm not allowed to do anything else.

Thanks for any help.
Alessandro




 
Alessandro Camel
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sometimes the solution is only one: Try it!

I found this very clear page:
http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-using-ssl.html

I followed the instructions and everything is working!

End of my first ( and useless ) post !

 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I generally set properties as:

Alessandro wrote: Sometimes the solution is only one: Try it!

That's whay SearchFirst

And welcome to JavaRanch

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic