• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

[SOLVED] - Connection to mysql using certificates

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 !

 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic