0
votes

When I try to connect to a MySQL Database from my .NET application i keep getting the error:

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I went to this URL and downloaded/installed the Windows, MSI Installer Connector-ODBC but I am still getting the error. Is there something else I should be doing to get this to work?

This is the connection string I am using:

<add name="sfc" connectionString="DRIVER={MySQL ODBC 5.1 Driver};SERVER=111.111.111.111;PORT=3306;DATABASE=dbname;USER=username;PASSWORD=password;OPTION=0;" />
1

1 Answers

1
votes

Check that the ODBC driver is properly installed (run odbcad32.exe and go to the drivers tab)

Anyway, you should use the native ADO.NET provider rather than the ODBC driver, it's more efficient.