I keep this while working php artisan migrate
SQLSTATE [HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename or servname provided or unknown
My environment
- Laravel Framework Version 5.1.20 (LTS)
- Laravel Installer version 1.2.0
- PHP 5.6.14 (cli) (built: October 2, 2015 08:55:56)
- mysql Ver 14.14. Distribution 5.6.24, for osx10.10 (x86_64)
.env
APP_ENV=local
APP_URL=http://localhost/
APP_DEBUG=true
APP_KEY=****
DB_HOST=http://localhost/
DB_DATABASE=name-local
DB_USERNAME=root
DB_PASSWORD=
UNIX_SOCKET = /tmp/mysql.sock
This database name-local
exists in my local database.
Any tips / suggestions would be a huge help for me.
source
share