[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 611
  • Last Modified:

MySQL and ASP.net 1.1

I am getting this error while trying to connect to a MySQL server.

Connection String :
Driver={MySQL ODBC 5.1 Driver};Server=11.111.111.111;database=store;Uid=root;Pwd=root;Option=3;

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

How do i check which version of the driver is installed ? Should this be on the DB server or ASp.net webserver ?

0
byte1
Asked:
byte1
  • 3
  • 3
  • 2
  • +1
1 Solution
 
ajitha75Commented:
Are you using MySQL Connector Net.

You can use the below connection string in that case

"datasource=11.111.111.111;username=root;password=root;database=store"

Thanks
Ajitha
0
 
byte1Author Commented:
/i thought the mysql connector Net was only on 2.0 framework. I was not able to add those reference DLL's in VS2003
0
 
Jon500Commented:
To see versions of your ODBC drivers, click Start in Windows Vista, then in the search box type ODBC and hit enter. A dialog will open; now you can access the Drivers tab. In XP you can go to Control Panel|Administrative Tools|Data Sources.

Regards,
Jon500

0
Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

 
Jon500Commented:
By the way, drivers need to be on the machine FROM WHICH you are making a connection to the database. In your case, this is the web server.

Regards,
Jon500
0
 
ICaldwellCommented:
You will need to download and install it:

http://dev.mysql.com/downloads/connector/net/

it does not come with .Net 2.0 framework.. only the MSSQL connection is part of the framework....
0
 
byte1Author Commented:
under ODBC Data Sources, I see a Drivers Tab, which has only a single entry "Microsoft ODBC for Oracle" and the About Tab has version 3.526.3959.0
0
 
ICaldwellCommented:
You will need to download the MySQL driver to be able to use the ODBC connection...  As mentioned above this will need to be installed on every system running the application and accessing the MySQL database via this code....  This is normal, a lot of people are using this connector....
0
 
ajitha75Commented:
have you downloaded Connector-ODBC 5.1.6 yet? If you have, you should see the MySQL ODBC 3.51 Driver in the drivers list.

http://dev.mysql.com/downloads/connector/odbc/

Thanks
Ajitha
0
 
byte1Author Commented:
I did install the mySQL driver on the server, now it says version 5.01.06.00

My connection string has:

{MySQL ODBC 5.01 Driver}

I still get the same error.
0
 
ICaldwellCommented:
It should be Driver={MySQL ODBC 5.1 Driver};SERVER=abc.abc.abc.abc;DATABASE=dbname;UID=uidname;PWD=pwdname;PORT=3306;OPTION=67108864;

Not 5.01

You will need the connector on the client computers, not the server....
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 3
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now