✓ Solved

SSL Error with Managed MySQL Database and perl DBI

Linode Staff

I am trying to use perl DBI and DBD::mysql on Debian 10 to connect to my Linode Managed Database. I am getting the following errors:

SSL connection error: Key usage violation in certificate has been detected

SSL connection error: The certificate is NOT trusted. The certificate issuer is unknown.

1 Reply

✓ Best Answer

To setup the server, I ran:

apt-get update && apt-get upgrade
apt-get install build-essential
apt-get install mariadb-server
cpan App::cpanminus
cpanm DBI
cpanm DBD::mysql

I put the certificate in /usr/local/share/ca-certificates/ and ran:

update-ca-certificates

In the connect parameters for DBI:mysql, I included the following in addition to the database, host, user, and password parameters:

mysql_ssl=1; mysql_ssl_ca_file=/usr/local/share/ca-certificates/database-ca-certificate.crt; mysql_ssl_verify_server_cert=0

Setting mysql_ssl_verify_server_cert to 0 or 1 did appear to impact the outcome.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct