PDA

View Full Version : Connecting to mysql from ASP page...



evetommy
10-21-2004, 01:11 PM
Hi all,

I was wondering if anyone could help me with this error. When i try to connect from an asp page (i've installed chilisoft) to the mysql database I get following error:

I have no idea what i'm doing wrong... any help would reall be appreciated.

ADODB.Connection.1 error '80004005'

SQLState: S1000
Native Error Code: 2002
[TCX][MyODBC]Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

evetommy
02-05-2005, 03:22 AM
Thanks to the nice people at the Westhost helpdesk the problem was fixed impressively quick. Thanks guys! :D

usmultisportpubdev
06-06-2005, 08:32 PM
Hi,

I've got the exact same error message as you noted, only Westhost is telling me they don't support this issue. Would you mind posting the resolution?? I'd really appreciate any help in getting past this.

Thanks in advance
John

evetommy
06-07-2005, 01:40 PM
I'll give it a go ;) I made an error in my connectionstring...
This hopefully should do the trick if the problem is in the connection string:

<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Driver={MySQL}; SERVER=IPADDRESS; DATABASE=DBNAME; UID=USERNAME; PWD=PASSWORD"
SET rs = conn.Execute(mySQL)
%>

Hope it'll work!

usmultisportpubdev
06-07-2005, 02:04 PM
Hi,

Thanks for the thoughts. Do you really use the IPAddress of your site to connect?? When I use my IP, I get a response back that it can't find any MySQL server. Other than that, I'm doing the exact same thing as you've noted below.

Hopefully, the WH admins will have another idea.

Thanks again.

John