Open theDanielJLewis opened 11 years ago
It's not the same localhost and 127.0.0.1 for mysql connections.
http://serverfault.com/questions/295285/mysql-cannot-connect-via-localhost-only-127-0-0-1
It's because the socket filename is incorrect.
This is in the MySQL configuration:
socket = /Applications/MNPP/tmp/mysql/mysql.sock
The path in php.ini needs to be updated to reflect this:
[mysql]
mysql.default_socket = /Applications/MNPP/tmp/mysql/mysql.sock
[mysqli]
mysqli.default_socket = /Applications/MNPP/tmp/mysql/mysql.sock
[pdo_mysql]
pdo_mysql.default_socket = /Applications/MNPP/tmp/mysql/mysql.sock
@Daniel15 your solution worked for me thanks.
Oddly, nothing related to MySQL works when I use "localhost," as this appears to use a socket that isn't available in MNPP. (I'm not exactly sure I understand this.)
But if I use "127.0.0.1" instead of localhost, it works fine.
What's going on wrong?
I do have localhost assigned in my hosts.