On Mac OS X 10.6, I am able to connect to mysql in php with
$mysql = mysql_connect(localhost,user,password)
However, if I use the same in Mac OS X 10.9 (Mavericks), I get the error message:
Warning: mysql_connect(): No such file or directory
if I use $mysql = mysql_connect("127.0.0.1",user,password)
, it works OK, but I'd rather not make the change everywhere.
I've read on this site that there is a socket issue, but I already have this in php.ini.default: pdo_mysql.default_socket=/tmp/mysql.sock
Any idea on how to make mysql_connect(localhost,user,password) work on 10.9
?
Please read those articles: