I have searched for a couple of hours now, and still am unable to find this.
I get 2 errors, if I use the database host as 'localhost'
, I get this error:
[PDOException]
SQLSTATE[HY000] [2002] No such file or directory
and if I change the database host to '127.0.0.1'
I get this error:
[PDOException]
SQLSTATE[HY000] [2002] Connection refused
Things I have tried:
- changing where the apache / mysql server is run (either user or `josh (Apache) / josh (MySQL)
- changing the port that MySQL runs on in MAMP, and putting that port in the mysql array in the
database.php
file - changing the host of the connection from
localhost
to127.0.0.1
and back. - creating a new user in
phpmyadmin
- turning off the firewall
Any ideas how to fix this?