1

I'm developing an CakePHP 4 app (with MySQL, and PHP 7.2) and when I bake, something go wrong and throw this:

MacBook-Pro-de-JP:ldb jp$ bin/cake bake all people Bake All
 -------------------------------------------------------------------------------
One moment while associations are detected.
Exception: SQLSTATE[HY000] [2002] No such file or directory
In [/Applications/MAMP/htdocs/ldb/vendor/cakephp/cakephp/src/Database/Driver.php, line 102]

Do you know how to solve this?

Thanks in advance!

  • 2
    If you search for that error message, you'll find that it's mostly a socket misconfiguration problem (note that Server and CLI often use different PHP configuration files). Some people also seem to get around the problem by connecting to `127.0.0.1` instead of `localhost`. **https://stackoverflow.com/search?q=2002+No+such+file+or+directory** – ndm Jan 21 '20 at 20:47

0 Answers0