I have installed Laravel 5 successfully and changed MySQL credentials in database.php file in config directory to \'
mysql\' => [ \'driver\'
None of these worked for me when I deployed my website online on shared hosting, below is what I did that worked.
In the .env file, I changed
.env
DB_HOST=127.0.0.1
to
DB_HOST=localhost
and viola, it worked well as expected.