RamiAwar / dataline

Chat with your data - AI data analysis and visualization on CSV, Postgres, MySQL, Snowflake, SQLite...
https://dataline.app
GNU General Public License v3.0
129 stars 6 forks source link

Add mysql python connector used by sqlalchemy #230

Closed anthony2261 closed 1 week ago

anthony2261 commented 1 week ago

Support mysql connections. DSN example: mysql://username>:<password>@<host:/

Also tested in pyinstaller binary

Closes #229

RamiAwar commented 1 week ago

I remember I already added this connector before:

image

So we don't need this other connector, Pymysql seems to be recommended by SQLAlchemy.

I'll look into the connection string tho, we probably still need that part except update it to pymysql connector.

RamiAwar commented 1 week ago

Reason why I chose it back then: Easy to use since doesn't depend on any lib (pure python) and is not the slowest of all. Not sure if it still makes sense to keep it but it seems well maintained so doesn't matter much I guess.

image
RamiAwar commented 1 week ago

Also FYI we have DSN validation already in the schemas for DSN, so the mysql connector replacement should happen there instead. I remember only cause I've written that code 😄

anthony2261 commented 1 week ago

@RamiAwar good catch, I've replaced the mysql connector to use pymsql, and moved the dsn validation to the right place