Closed jayden-chua closed 5 years ago
Sorry, just saw the Videos Errata link here https://github.com/bitpressio/docker-for-php-developers-errata/blob/master/video-course-errata.md
Hey no worries, it can get pretty confusing to follow errata sometimes 👍
In Laravel (5.8) .env file for database configurations.
DB_HOST=127.0.0.1
Using 127.0.0.1 for DB_HOST will result in the following error when trying to run
php artisan migrate
for the first time.SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = laravel and table_name = migrations and table_type = 'BASE TABLE')
I think we can fix this if we use the name services. So in this case, in the video "06 - Laravel - Setting up MySQL" since, we named the MySQL service
mysql
we have to usemysql
for the .envDB_HOST
. ChangeDB_HOST=127.0.0.1
toDB_HOST=mysql
.