database - SQLSTATE[HY000] [2003] Can't connect to MySQL server on '127.0.0.1' (111) (Laravel) -


my host moved me server since have been battling error.

please, how can resolve this?

thanks

from database.php config,

'mysql' => [     ...     'host' => env('db_host', '127.0.0.1'),     ... ], 

you need @ .env file. db_host variable. if it's not there, database config defaults 127.0.0.1


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -