Click to See Complete Forum and Search --> : ASP / MySQL connection problems


Ben H
04-11-2006, 07:14 AM
Sorry to repeat this question, but I am getting this error on my site...

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


I have not seen the solution to this issue - any help gratefully received
(note this issue has occurred where there may have been some changes on the hosting, but definitely no changes on my side to the website or database).

I have been in contact with the host but they have been very slow in replying. They certainly have not been much help so far.

I am wondering if there is a simple change that can be done on my part

many thanks for any help
rgds
Ben

<Eddie>
04-11-2006, 08:04 AM
Can you please post your connection string and methods as this may help form a better response.

As for sock errors, I usually see these where the host is being incorrectly referred to. The most obvious one is referring to the host as 'localhost' when their maybe a distinct hostname that the server requires. MySQL Admin or equiv. [if installed] maybe able to establish the correct reference to this.

Ben H
04-11-2006, 08:11 AM
thanks Eddie,
I do have access to the MySQL Admin function - will check if anything has changed.
My connection string looks like this...
'--- connection required for database server
strConnect = "driver={MySQL}; server=localhost; database=ddddddd; UID=uuuuuuuu; PWD=ppppppppppp;"
thanks
Ben

Ben H
04-11-2006, 08:14 AM
and also

Sub OpenConn()
'Create the connection object
Set objConn = Server.CreateObject("ADODB.Connection")
'Open the connection
objConn.Open strConnect
End Sub

<Eddie>
04-11-2006, 08:17 AM
It's a fundamental connection error and I'd put my money on it being the 'server=localhost' section of strConnect. Try finding out if the reference is different on the server or even playing with IP addresses.

Ben H
04-11-2006, 08:20 AM
Eddie

thanks again - glad I'm not going mad

Ben

Ben H
04-12-2006, 04:21 AM
Resolved by hosting company - still waiting for explanation from them - my guess is they did some upgrades to MySQL