I think you should be fine
after changing the php.ini file.
Yes, I wouldn't be surprised if the problem is an existing
configfile, but I don't know which one. The location
of mysql.sock isn't specified or implied in php.ini, so
far as I can see.
Check again.
"grep mysql php.ini" shows "mysql.default_socket"
Comment says: default socket name for local MySQL connects. If empty, uses the built-in.
So edit your php.ini
Configuring mysql with
--with-unix-socket-path=/usr/local/mysql/var/mysql.sock
doesn't seem to make any difference either.
I would expect mysql.sock to live in /tmp
Run configure again would help but you need to
-remove the COMPLETE source directory and create a new one from the .gz file
-remove the old config config.cache (not sure with PHP, but needed with some apps)
I think I would remove the complete source, just to be sure.
I'm glad my distro (Slackware) doesn't install all kinds of software I don't want.
Bye,
B.