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 connection string by replacing the server name to that specified by my Internet Hosting Company (along with the relevant dbase, uid, and pwd), buit my website and published it to a different virtual address on my local server (using Web Deployment Manager), and then copied the files onto my internet webspace.

The weird thing is that the error keeps referring to the LOCALHOST server (this is the one I use in my Local PC).

Could somebody please help resolve this problem? I've been trying to fix this error for a couple of days now and seem to be stuck with it. :(

Thanks.

0
Doods
4/12/2006 1:32:06 PM
asp.net.mysql 1929 articles. 0 followers. Follow

5 Replies
6840 Views

Similar Articles

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

Hello,

Recheck your connection string. Also do one more thing to check connection. If you've MySQL administrator or Query browser tool, enter the name of server and database in it and test the connection.
Also try using IP instead of server name.

Regards

Kuldeep Deokule

MCSD.NET
Blog: http://dkuldeep.blogspot.com

This posting is provided "AS IS" with no warranties, and confers no rights.
0
deokule2003
5/1/2006 4:53:37 PM
We kinda got the exact same error.

Site was running fine. Then our customer calls in to say he gets an error. We check it, the asp.net app won't connect to MySQL. We restart MySQL, and it works fine. 10 min later, same thing happen !

I restart the MySQL Service and check to see if I can connect to using the mysql consol (in dos) and it just won't let me in, saying it can't connect to mysql !

we restart the server, and it works fine.

Any idea ? ASP.NET 1.1 and MySQL Connector 3.51 .

Thanks

Martin Bittner, MCP
0
martinbl
5/1/2006 8:11:57 PM

I discovered that the cause of the problem was my using ODBC driver instead of MySQL Connector; apparently my ISP does not support ODBC.  Also I was using

I rewrote the connection string in my web.config file and now my application works.

Regards,

0
Doods
5/2/2006 4:40:52 AM

could you show me your connection string (hiding your credential). Thanks


Martin Bittner, MCP
0
martinbl
5/2/2006 4:55:38 PM

Sure.  In the web.config file, i have the following entry:

<configuration>
  <connectionStrings>
    <add name="myConStringName" connectionString="server=MYSERVER; database=MYDBASE; user id=MYUSERID; password=MYPASSWORD;  pooling=false"/>
   </connectionStrings>
</configuration>

Please note the above connectionstring is for ASP.Net 2.0.  For 1.1, the correct signature is as follows:

<add key="myConStringName" value="driver={MySQL ODBC 3.51 Driver}; server:MYSERVER; database=MYDBASE; user=MYUSERID; password=MYPASSWORD;"/>

Regards,

0
Doods
5/3/2006 4:29:02 AM
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 [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...

ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
Hi,  I've downloaded the following onemysql-5.1.31-win32 after having unzipped the zip file I then locate to this folder \mysql-noinstall-5.1.31-win32\mysql-5.1.31-win32\bin> But after I've typed 'mysql' to go, I got this issueERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)  Many Thanks & Best Regards,HuaMin Chen(Mark it as answer if it does help you!) try to instal mySql with the free tool "AppServ"... is more simple....

ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
Hi, I've downloaded the following onemysql-5.1.31-win32 after having unzipped the zip file I then locate to this folder \mysql-noinstall-5.1.31-win32\mysql-5.1.31-win32\bin> But after I've typed 'mysql' to go, I got this issueERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)Many Thanks & Best Regards,HuaMin Chen(Mark it as answer if it does help you!)...

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...

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? ...

Can't connect to MySQL server on 'localhost' (10061)
Bugzilla: 3.0.2 MySQL: 5.0.45 perl: 5.8.8 OS: Windows XP Pro I belive I have everthing installed, and am trying to configure. Trying to run the checksetup, I am getting the error: Can't connect to the database. Error: Can't connect to MySQL server on 'localhost' (10061) The checksetup has 'ok' for all except PerlMagick, then tries to connect to DB. The question asked is "Is your database installed and up and running?" It is started in the Services: MySQL, and I see a process in the Task Manager: mysqld-nt.exe. I think the asnswer is...

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. ...

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. ...

ERROR [42S21] [MySQL][ODBC 3.51 Driver][mysqld-4.1.21-community-nt]Unknown column 'UserName' in 'where clause'
strSQL = "SELECT Security_User, Security_Pass FROM Security Where Security_User=UserName AND Security_Pass=UserPass"Dim da as OdbcDataAdapter = New OdbcDataAdapter(strSQL, con)Dim objCommand As New OdbcCommandBuilder(da)Dim ds as Dataset = new Datasetda.Fill(ds,"Security")count = ds.Tables("Security").Rows.Count I get this error number when i run this portion of code. The UserName and UserPass are the values get from text boxes.Is it the strSQL assigned with wrong values?  Add quotes around it. It thinks it's a column.i.e.strSQL = String.Format(&...

ERROR [HYT00] [MySQL][ODBC 3.51 Driver]Access denied for user: 'root@localhost' (Using password: YES)
Here is whats going on.  I created a form that adds and edits rows in a MySQL Database on my personal server.  I moved the database and the form to the webserver where it is going to be and I am getting this error. Server Error in '/' Application. ERROR [HYT00] [MySQL][ODBC 3.51 Driver]Access denied for user: 'root@localhost' (Using password: YES) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Da...

[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 ------------------------------...

Web resources about - ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'localhost' (10061) - asp.net.mysql

Resources last updated: 1/16/2016 7:00:51 PM