mysql.sock giving error, php5 won't go, drupal page won't load, mac os x server

 

So...on reinstall of a Mac OS X.4 Server, the mysql server would work from the command line, but not from the web server.

It gave a mysql.sock error.

This page...

http://www.tech-recipes.com/rx/762/solve-cant-connect-to-local-mysql-ser...

indicated the solution was to create a symlink in the /tmp directory to the correct mysql.sock file

ln -s /private/var/mysql/mysql.sock /tmp/mysql.sock

but this disappears on reboot.

However, the problem was in fact in the php.ini file found here.

/usr/local/php5/lib/php.ini

Find the line titled ...

mysql_default_socket =

and change it to ...

mysql_default_socket = /private/var/mysql/mysql.sock

And reboot. It works.