I cannot seem to get jdbcmysql to run over ssl.
Downloaded gems:
jdbc-mysql (5.0.4)
jruby-openssl (0.7.1)
Using a normal rails console (not jruby), I got it to run with (sanitized below):
cp = ActiveRecord::Base.establish_connection(
:adapter => 'jdbcmysql',
:host => 'host',
:username => 'user',
:password => 'pw',
:database => 'db',
:sslca => "ca-cert.pem"
)
but the same command throws this right after I call cp.connection:
RuntimeError: The driver encountered an unknown error: java.sql.SQLException: Access denied for user 'user'@'host' (using password: YES)
in jruby console. This is probably because ssl is not used because I set the user to require ssl.
Does jdbc-mysql just not support ssl? I’m pretty sure the jdbc adapter does.
What happened here was that the mysql client was version 5.0 while the server was 5.1
The syntax is exactly the same, accessing without ssl works, but with ssl silently fails 🙁