Problem Statementunable to connect mysql db through my ASP.NET application.
Error MessageERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
SolutionIn order to fix this issue, we have added connector for ODBC 5.x DSN on Windows. Following are the steps:
- On the Start menu, choose Administrative Tools, and then click Data Sources (ODBC). Open the ODBC Data Source Administrator.
- To create a System DSN (which will be available to all users), select the System DSN tab. To create a User DSN, which will be unique only to the current user, click the Add button.
- Select the ODBC driver for this DSN.
- Select MySQL ODBC 5.x Driver for the appropriate level of Connector/ODBC, then click Finish.
- You now need to configure the specific fields for the DSN you are creating through the Connection Parameters dialog.
- In the Data Source Name box, enter the name of the data source to access. It can be any valid name that you choose.
- In the Description box, enter some text to help identify the connection.
- In the Server field, enter the name of the MySQL server host to access. By default, it is localhost.
- In the User field, enter the user name to use for this connection.
- In the Password field, enter the corresponding password for this connection.
- The Database pop-up should automatically populate with the list of databases that the user has permissions to access.
- To communicate over a different TCP/IP port than the default (3306), change the value of the Port.
- Click OK to save the DSN.