Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SSL certificate support for mysql #347

Open
wangxiaoying opened this issue Sep 5, 2022 · 6 comments
Open

Add SSL certificate support for mysql #347

wangxiaoying opened this issue Sep 5, 2022 · 6 comments

Comments

@wangxiaoying
Copy link
Contributor

Add SSL certificate support for mysql

@DanteOz
Copy link

DanteOz commented Dec 27, 2022

I'd be interested in this feature.

@nickodell
Copy link

nickodell commented Jan 22, 2023

Just wanted to register interest in this, and share what I found while researching this.

The upstream crate does seem to have SSL support. While reading #104 to figure out what would need to change, I noticed a review comment saying that native-tls is preferred. Fortunately the upstream crate supports that as well.

There's also an example in the docs of how to use SSL, although I can't quite get it to work with strict SSL certificate checking. (I had to change with_root_cert_path to with_root_ca_path to get it to work, so the docs may not be quite up to date.)

My own reason for interest in this is the Polars library, which requires connector-x to load data from SQL. Without SSL support, the fastest way to get data into Polars is to use Pandas with SQLAlchemy to load the data, which you can imagine is not fast.

@silex-thomas
Copy link

silex-thomas commented Mar 13, 2023

Hi, I'm in the process of migrating my calls to pd.read_sql_query to cx.read_sql for performance improvements. However, my company mandates using SSL by specifying ssl-mode=preferred in the connection string. To my understanding, SSL is currently not supported for MySQL, when specifying in the connection string:
mysql://username:password@server:port/schema?sslmode=preferred

I encounter the following error:

RuntimeError: Unknown URL parameter `sslmode'

I have also tried other variants such as ssl-mode, sslMode etc.

Is there any ETA for this feature? Thanks for the great work by the way!

@nickodell
Copy link

nickodell commented Jul 16, 2023

By the way, my company would potentially be interested in sponsoring work on this feature. We have a MySQL server with SSL, and it would benefit from using connector-x. Would funding be helpful?

@silex-thomas Are you in a similar position to me? Would your company also be interested in sponsoring this?

@kshomestead
Copy link

Really need ssl if possible. Anybody discover a workaround?

@DanteOz
Copy link

DanteOz commented Oct 26, 2024

I switched to using duckdb with the MySQL extension and the .fetch_pyarrow_batch() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants