Database not configured laravel during migration

前端 未结 4 1347
南旧
南旧 2021-01-12 03:43

This might be repeated question. But I had no luck with previous answers

I just git clone a laravel project. Now I tried to do php artisan migrate

4条回答
  •  温柔的废话
    2021-01-12 04:21

    I had the same problem, turns out the .env that shipped with the framework defaulted the DB_HOST to localhost and had DB_PORT set.

    Changed the host to the FQDN of the machine and it worked fine. I'm guessingif you're connecting to localhost it expects a socket and not a port.

提交回复
热议问题