Can't connect to MySQL database using ODBC.NET

I recently downloaded and installed ODBC.NET from Microsoft Download Center site. I can reference the namespace (Microsoft.Data.Odbc) in my project and the code (C#) compiles just fine. However, at runtime, I cannot connect to the database. It keeps complaining about not being able to find the data source.

The connection string is:
"Driver={MySQL};SERVER=...;DATABASE=...;UID=...;PASSWORD=...;PORT=3306;OPTION=3;STMT=;"
If I use MySQL ODBC driver, I have no problem whatsoever. The connection string is almost the same, only Driver={MySQL} is replaced by Driver={MySQL ODBC 3.51 Driver}.
I checked in ODBC Data Sources applet, and ODBC.NET is not listed in the drivers list, although MySQL ODBC driver is there. That may explain the above failure. I tried to figure out how to get the driver listed there, I installed several times on my machine, then I installed it on a different computer, still no luck. Your help is greatly appreciated.
Best regards,
smartcatxxx
cat

Future Computers Research Inc.

Ahead of its time in IT intelligence

0
smartcatxxx
5/25/2004 12:52:50 PM
asp.net.mysql 1929 articles. 0 followers. Follow

0 Replies
962 Views

Similar Articles

[PageSpeed] 4
Get it on Google Play
Get it on Apple App Store

Reply:

Similar Artilces:

ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP Address of the server'(10048) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP of the server' (10
Hi, I am randomly getting the following error message in my application. ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP Address of the server'(10048) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP of the server' (10048) I am using .Net 2.0 with VS2005 having ODBC 3.51.14 Driver.  Can any body point out the core reasons of the above error message? Thanks. Nouman Khawaja. I do have the same problem, help me out. Thanks  If the going seems easy, You are going DownHill... When I was writing ...

ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'localhost' (10061)
Greetings all! I have this weird error "ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'localhost' (10061)" on my website that is supposed to connect to a MySQL database on a different server (NOT localhost). Here's the scenario: I develop my ASP.Net 2.0 website on my PC using this connection string for my ObjectDataSource: <add name="ConnectionString" connectionString="Driver={MySQL ODBC 3.51 Driver};server:localhost; database=MYDBASE;uid=MYUID;pwd=MYPWD" providerName="System.Data.Odbc" /> After testing and finding all pages working fine, I changed my co...

ERROR [HYT00] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'work' (10050)
Hi  I am facing problems with connecting to MySQL, I am using the same settings as before and earlier I was able to connect. I formatted the machine and now am getting problems.The following is my connection string:<add key="ConnectionString" value="Driver={mySQL ODBC 3.51 Driver};Server=servername;Database=dbname;Uid=uid;Pwd=pwd;Option=3;" />and I receive the following error:ERROR [HYT00] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'work' (10050) Please help me on this front. ThanksSandyLooking to check the time, goto http://whatisthe...

Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
Hi, I get the error when I try to connect.. :o(( What's wrong? TIA, Juan. ...

can't connect to sql server database with same connection used in visual studio .net 2003
I have the following code that works fine in visual studio .net 2003 but not with VWD.  I have sql server 2000 developer edition installed locally and this connection works fine with visual studio.  With VWD it fails with the exception "System.Data.SqlClient.SqlException: Login failed for user 'DARRELL\ASPNET'".  It fails on the conn.Open line.   any ideas on what the issue is?Dim conn As SqlConnectionDim connstr As Stringconnstr = "Data Source=DARRELL;Initial Catalog=Event;Integrated Security=SSPI;"Dim daEvents As New SqlDataAdapter("select * from events", connstr...

MySQL
Currently have a site coded in PHP but the customer wants to go to .NET. Can I use the existing MySQL DB or am I required to use MSSQL? Thanks, Ken Check out this forum which is specialized for this kind of questions: ASP.NET MySQL forumBart De Smet [MVP] Visit www.msdn.be, www.bartdesmet.net...

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.soc
2 day old install of 11.3; I installed MYSQL from yast2; 12 items relating to MYSQL are shown as installed; on a command line (as root) I get "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.soc" when I type MYSQL. Another problem ; Apache is installed and running, but my install of PHP from Yast has been troubled, and very much unlike what I read here : "http://www.novell.com/coolsolutions/feature/595.html" ; a web page with phpinfo() shows nothing; do I have to do another manual config of LAMP ? If so wh...

error
I just recently reinstalled MySQL-server-4.0.20-0.i386.rpm and now when I bring up my http://158.114.148.90/bugzilla/ page, I get the following error diplayed on the browser: Software error: Bugzilla is currently broken. Please try again later. If the problem persists, please contact long.p.nguyen@ngc.com. The error you should quote is: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) at globals.pl line 140. For help, please send mail to the webmaster (root@localhost), giving this error message and the time and date of the error. What did I not do? ...

error 2003 - Can't connect to MySQL server on 'localhost' novell 6.5 mysql
I received this error on the dual homed server when I tired to load mysql.nlm and after I changed the ipaddress of the server and then tried to chage it back. My Php scripts were hanging and giving me the error "Can't connect to MySQL server on 'localhost' (60)". The mysqld_safe was loaded on the server just fine. Fix I went into Remote manager and clicked on Ip Address Management. Here I found Mysql and changed the address to 0.0.0.0 and the port number to the correct port. Then I modified my scripts to use the new ipaddress for database connectivity ins...

mysql 5.0.24 gives error "Can't find messagefile '\MYSQL\bin/\MYSQL\bin/sys:/mysql/share/english/errmsg.sys'"
Hi All I've just tried to do a small mysql update to 5.0.24, but it gives me an error: Can't find messagefile '\MYSQL\bin/\MYSQL \bin/sys:/mysql/share/english/errmsg.sys' I've tried adding basedir=sys:/mysql to the my.cnf: [mysqld] default-character-set=latin1 language=english bind-address=0.0.0.0 port=3306 datadir=web:/mysqldb basedir=sys:/mysql skip-locking skip-innodb but it didn't do any difference, does anybody have an idea to this? NetwareGuy, It appears that in the past few days you have not received a response to your posting. That co...

Re: mysql 5.0.24 gives error "Can't find messagefile '\MYSQL\bin/\MYSQL\bin/sys:/mysql/share/english/errmsg.sys'"
Is there a solution for this? Netware Guy posted it on 05 Aug 06. Thanks. ...

I need to insert data into a mySQL 4 DB using ODBC, and I'm using .NET 1.1
I think the subject line pretty much clears up what I need to do.  I've included the code below that I have so far, I think I've got the connection right, but I don't know how to insert the data in the table when the command button is clicked.  Any help would be much appreciated.  Thanks.<%@ Page Language="VB" AutoEventWireup="False"  EnableSessionState="False" EnableViewState="False" %><%@ Import Namespace="System.Data" %><%@ Import Namespace="System.Data.Odbc" %><%Dim ConnStr As String = "Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=con...

[MySQL] ERROR 2002 (HY000): Can't connect to local MySQL...
Hello, I've downloaded and installed MySQL-client-5.1.53-1.glibc23.x86_64.rpm. I'm rather new to linux so it might be I haven't started the server. Unfortunately I have no idea which file is responsible for that. It is also possible that my head isn't functioning correctly ( if at all ) since I haven't slept well so please don't eat me alive. Kill me at least. ;) Error I receive is: > ERROR 2002 (HY000): Can't connect to local MySQL server through socket > '/var/lib/mysql/mysql.sock' (2) -- starach ------------------------------...

can't connect to mysql database from web
------=_NextPart_000_00E8_01C136CD.C60ED160 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I have a cgi script that can't seem to connect to a mysql database when = running from the web. When I logon and run it from the command line, it = works fine! It dies on the $dbh->connect(...) line. It dies before the line returns = so I can't check $DBI::err or $DBI::errstr. Does mysql use any environment variables that need to be setup to run as = a cgi script? ------=_NextPart_000_00E8_01C136CD.C60ED160-- ______...

Web resources about - Can't connect to MySQL database using ODBC.NET - asp.net.mysql

Resources last updated: 1/5/2016 12:10:34 AM