Reputation: 85
I got this error when I logged in.
I tried:
My code:
DB_CONNECTION=mysql
DB_HOST=http://45.77.34.158/phpmyadmin
DB_PORT=3306
DB_DATABASE=dataname
DB_USERNAME=user
DB_PASSWORD=12345679
My server is an online server! Can anybody tell me where I am wrong? I use php7.3.9, laravel 5.7, composer 1.9.1.
Upvotes: 5
Views: 28583
Reputation: 5662
DB_HOST
should be IP Address only
Change
DB_HOST=http://45.77.34.158/phpmyadmin
to
DB_HOST=45.77.34.158
if that doesn't work then run this command this will help you to clear cached config
php artisan cache:clear
Upvotes: 12
Reputation: 360
DB_CONNECTION=mysql
DB_HOST=45.77.34.158
DB_PORT=3306
DB_DATABASE=dataname
DB_USERNAME=user
DB_PASSWORD=12345679
Upvotes: 3
Reputation: 975
the host should not be an URL, instead use only the IP ADDRESS.
DB_HOST=45.77.34.158
Upvotes: 4