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: