I have mysql 5.6 running in a remote docker container, I've verified I can connect to it with a sql client, but I tried to configure the connection string like so
DRIVER={MySQL ODBC 5.1 Driver};SERVER=[lan IP];PORT=3306;DATABASE=myDatabase; USER=[redacted];PASSWORD=[redacted];OPTION=3;
I get the following error
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
How do I resolve this? Google suggests I need to dig into windows and do a bunch of stuff in ODBC, I tried doing that but it refuses to connect to my sql server. Do I really need to do that?
EDIT: Figured it out
2 things need to happen.
1, the "SQL server" driver that microsoft ships with Windows 10 is only for their SQL Server they maintain, which isn't compatible with MySQL in the slightest.
You need to download the ODBC driver for mysql. The latest one as of this time of writing is compatible with 8.0, 5.6 and 5.7
https://dev.mysql.com/downloads/connector/odbc/After that, modify the connection string so it reads like so
DRIVER={MySQL ODBC 8.0 Unicode Driver};SERVER=[lan IP];PORT=3306;DATABASE=myDatabase; USER=[redacted];PASSWORD=[redacted];OPTION=3;
You can verify the driver name in the 64bit ODBC data source manager in Windows.