PHP set MySQL socket location
I do not know why your default config doesn't update, but you can set the socket location at connection time, for exemple:
DSN for PDO:
mysql:unix_socket=/tmp/mysql.sock;dbname=...
mysql_connect:
$db = mysql_connect('localhost:/tmp/mysql.sock', ...