duckdb_mysql icon indicating copy to clipboard operation
duckdb_mysql copied to clipboard

Support Encrypted connection

Open aszenz opened this issue 1 year ago • 3 comments

I'm trying to connect to a MySQL database that only allows encrypted connections, but there doesn't seem to be a way to do that in DuckDB. I have a custom CA certificate file that I can normally use in the MySQL client (the ssl_ca parameter). DuckDB has no such parameter so a connection can't be established. Unless I'm overlooking something, it seems DuckDB doesn't support encrypted connections to MySQL. Any help would be greatly appreciated!

Moved from https://github.com/duckdb/duckdb/discussions/12676#discussion-6857956

aszenz avatar Jun 26 '24 13:06 aszenz

Thanks for the report! I've implemented these options in https://github.com/duckdb/duckdb_mysql/pull/85 - I don't have an encrypted MySQL instance myself to test so if you could try it out that would be very helpful.

Mytherin avatar Sep 05 '24 10:09 Mytherin

Thanks for the report! I've implemented these options in #85 - I don't have an encrypted MySQL instance myself to test so if you could try it out that would be very helpful.

Sure, do i need to wait for a release or I can load the master branch version of the extension somehow?

aszenz avatar Sep 05 '24 10:09 aszenz

It's obviously not an encrypted connection, but I can confirm the updated version available through the 1.1.0 CLI allows me to set ssl_mode=disabled and successfully connect to an internal DB at work. I was previously getting an SSL error, so this is a game changer!

mattsams89 avatar Sep 09 '24 20:09 mattsams89