Select Page

SLES 11 SP4 – mysql, php and sockets

Something changed in SLES 11 SP4 (or one of the very recent updates).

The default mysql.sock moved to /var/run/mysql/mysql.sock rather than the previous location in /var/lib

For some reason this meant that the defaults for PHP5 were looking for the wrong location for the socket.

A quick cleanup of /etc/php5/apache2/php.ini to include mysql.default_socket = /var/run/mysql/mysql.sock and everything is back functioning.