PDOException SQLSTATE[HY000] [2002] No such file or directory

后端 未结 30 3214
南方客
南方客 2020-11-22 03:23

I believe that I\'ve successfully deployed my (very basic) site to fortrabbit, but as soon as I connect to SSH to run some commands (such as php artisan migrate

30条回答
  •  感动是毒
    2020-11-22 03:41

    I'm running on MAMP Pro and had this similar problem when trying to migrate (create db tables). Tried a few of these mentioned suggestions as well but didn't do it for me.

    So, simply (after an hour googling), I added two things to the /config/database.php.

    'port' => '1234',
    'unix_socket' => '/path/to/my/socket/mysqld.sock'
    

    Works fine now!

提交回复
热议问题