this one helps. Change 'host' => env('DB_HOST', 'localhostphp artisan make:migration create_users_table'), to 'host' => env('DB_HOST', 'localhost'), then try it. Can you log into the mysql database with those credentials on the command line or in a MySQL GUI (like phpmyadmin, SequelPro, etc)?
it helps some times I know this question may have answers already in stackOverflow . But I have different issue here . I moved the laravel project from localhost to server . Which I have done every steps in server. I can able to view the login page in my server. The problem is, I can't able to connect with my mysql server . my .env file . , Make sure your DB credential and DB Host is set correctly :