ylliX - Online Advertising Network

Quicktip: SQLSTATE[HY000] [2002] Not a directory trying doctrine:schema:create

If you are using MAMP and trying to execute doctrine:schema:create or anything db related you may encounter that error, solution is simple – you need to create symlink to mysql.sock:

sudo mkdir /var/mysql
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
sudo chown _mysql /var/mysql/mysql.sock
sudo chmod 777 /var/mysql/mysql.sock

2 thoughts on “Quicktip: SQLSTATE[HY000] [2002] Not a directory trying doctrine:schema:create

  1. I am experiencing the same problem all of a sudden on my mac, and the solution doesn’t help.  I think I had already done this before, when I installed mysql and doctrine a few months ago.

     

    I noticed that my Mac was installing a new version of 10.10 could this be a problem?

     

    Any other ideas?

Leave a Reply