0

I'm using a MAMP stack with Phalcon and trying to use the Developer Tools. However if I try to create a model I get the following error:

ERROR: SQLSTATE[HY000] [2002] No such file or directory

I checked the installation itself, the sql settings of the project and the socket values (mysql, mysqli, pdo_mysql). I have no further clue about how to fix this.

2 Answers2

0

It seems that you have problem with connection to your DB. Check this answer - it suggests to use DB IP instead of hostname.

Community
  • 1
  • 1
Ololo
  • 1,087
  • 9
  • 16
0

Check if you can login to your database using console's command: mysql -u USERNAME -p. Add parameter -p only when you are using password for your user. Use credentials stored in your Phalcon config (assuming that you actually have one, if not - create it). More details If it doesn't work - solving this problem should solve model creating issue.

Luke
  • 2,350
  • 6
  • 26
  • 41