G'day Andre_C10002,
Welcome to the monastery.
I'm not in a postion to test this, but one problem may be all the embedded spaces and newlines in your DSN. Try writing it more like this:
my $dbh = DBI->connect(join('', 'DBI:mysql:database=_DATABASE_;host=_HOST_;', qw{ mysql_ssl=1; mysql_ssl_client_key=/etc/mysql/certs/client-key.pem; mysql_ssl_client_cert=/etc/mysql/certs/client-cert.pem; mysql_ssl_ca_file=/etc/mysql/certs/ca-cert.pem } ), '_SSL_USER_', '_SSL_USER_PWD_' ) || die DBI->errstr;
Another potential issue is what you really have for the placeholders you show (e.g. '_SSL_USER_PWD_'). If any of those are (or evaluate to) strings with special characters (e.g. "pass$word"), you may need to escape the special characters. There's several ways of doing this depending how you're actually getting that data into connect(). Some examples: "pass\$word", 'pass$word', q{pass$word}, "\Q$variable_holding_password\E".
-- Ken
In reply to Re: DBI:mysql connection over SSL fails
by kcott
in thread DBI:mysql connection over SSL fails
by Andre_C10002
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |