HY000] [2002] No such file or directory - MAMP & PDO

Posted 9 months ago

If you’re seeing the error HY000] [2002] No such file or directory

I solved my issue by running the following commands.


sudo mkdir /var/mysql
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock

Source: stackoverflow