'Migration Table Creation Error when using Laravel Sail. Information_schema.tables missing
My colleague has created a docker-composer.yml file and has shared that image with me.
When I run the container and attach this image, I am unable to create migratation tables through the command; "./vendor/bin/sail artisan migrate". I am using mySQL DB. I've tried running the following commands: (they worked for my other colleague when he got the error in image 1 below).
- ./vendor/bin/sail --rmi all -v
- ./vendor/bin/sail up -d
- ./vendor/bin/sail artisan config:clear
- ./vendor/bin/sail artisan cache:clear
- ./vendor/bin/sail artisan migrate
The following is the error message I get once I execute ./vendor/bin/sail artisan migrate.
Also, when I try "sail up -d", it shows me laravel.test error. However, it still completes the build. (Is the error in image 1 related to the error in the image below?)
Would appreciate any kind of help, thanks.
Solution 1:[1]
.env file changed from DB_HOST=localhost to DB_HOST=mysql. The issue was in the .env file parameters. Everything works fine now.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |