I download from https://github.com/luciddreamz/laravel Laravel for openshift then upload over my repository over github. This code for connect to database not work. The prob
If someone facing this problem when using Docker
, be sure if you are using your version of SQL.
In my case: MYSQL_VERSION=latest
changing to MYSQL_VERSION=5.7
.
Then you need to remove your unused Docker images with docker system prune -a
(docs).
Also, in your .env
you need to change DB_HOST=mysql
. And run php artisan config:clear
.
I think it will help someone.