duckdb / duckdb_mysql

https://duckdb.org/docs/extensions/mysql
MIT License
55 stars 13 forks source link

Support Encrypted connection #71

Open aszenz opened 4 months ago

aszenz commented 4 months ago

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

Mytherin commented 2 months ago

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.

aszenz commented 2 months ago

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?

mattsams89 commented 2 months ago

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!