Jump to content

SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/


brosjr

Recommended Posts

Hi all,

 

I'm experiencing a problem with the server I am storaging my PHP application. I developed it all based on PDO database access on Zend Studio 6 with 5.2.6 PHP version.

 

The server is running 5.1.6 PHP, so I asked them to update to 5.2.6 because I'm getting the following error message:

 

SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

 

They replied me telling me to use HOST instead SOCKET to access the database. I have searched for a solution and it all seens really confusing, because the queries without PDO return the correct results, but the ones with PDO shows the above message. Other solutions seens to be related to server configuration.

 

A simple update of the server would not solve this, once it runs perfectly on my computer? I really need to rewrite all my application to get rid of all the PDOs?

 

Thankx

Danilo Jr.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.