mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock'
The solution is to edit your php.ini file (after making a backup copy first in case something goes wrong, and looking for the line for mysql.default_socket, which you should change so it looks like this:
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysql.default_socket = /private/tmp/mysql.sock
See an article here for more details. There's also a handy test script here.
No comments:
Post a Comment