Closed fillalph closed 5 months ago
It looks like DB_HOST
might not be configured in the first example?
The MySQL driver uses the same underlying infrastructure as the standard mysqlclient
Python package (namely the official MySQL library) - if you can connect using that you should be able to connect using the MySQL extension as well.
Hi @Mytherin.
Thank you for pointing out that the duckdb_mysql
extension uses the mysqlclient
Python package.
From my looking into things, mysqlclient
doesn't have a way to add a "trusted_connection" parameter to the SQL connection string whereas the pyodbc
Python package does.
There is a similar discussion here on the sqlalchemy
GitHub discussion page about this connection parameter: https://github.com/sqlalchemy/sqlalchemy/discussions/11425?sort=new.
I will keep looking into this, but right now I don't believe I will be able to use DuckDB with the duckdb_mysql extension to make the connection.
Ah, I now see the problem. This extension is a MySQL client - it looks like you are trying to connect to SQL Server (or MSSQL). This is not supported and not expected to work using this extension.
I am looking to migrate from the Python pyodbc package to duckdb_mysql extension in an enterprise environment.
/
This works well.
/
As the SQL database is hosted in an enterprise enviroment, I am not sure if I have the port and socket right. I tried using the netstat command in windows to figure it out. I see the server ip:ms-sql-s.
I have tried the ATTACH_QUERY command also without a port and socket (just a host and database) and I get this error:
Does anyone have a thought on what I could try to get the connection established with duckdb_mysql?
Thanks