Connecting Tech Pros Worldwide Help | Site Map

PDO not connecting to MySQL

Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#1: Oct 1 '09
Hi,

I’m having a problem connecting to my local MySQL db. my PHP DB code throws the following Exception:
Quote:
PDO::__construct() [<a href='pdo.--construct'>pdo.--construct</a>]: [2002] No such file or directory (trying to connect via unix:///tmp/mysql.sock)
I suspect the socket being wrong since all my MySQL GUI clients connect via /opt/local/var/run/mysql5/mysqld.sock.

does anyone know, if that’s a correct assumption?

thanks Dormi
Reply


Similar MySQL Database bytes