First, I think <THINK> that by default the mysql.sock file is located at
/var/run/mysqld/mysqld.sock
By default make install's of mysql. First, check to see if this is right. If it is, for php to see your file socket, type in
ln -s /var/run/mysqld/mysqld.sock /var/lib/mysql/mysql.sock
This will create a symbolic link from the new one to where php intends to find it. Either that or recompile php, it should pick up the correct location.
Chris King