laravel-blog: Illuminate\Database\QueryException
When I run $ docker-compose run --rm blog-server php artisan migrate
, the first step of the ‘Before Starting’ section I get the following error message:
Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = laravel-blog and table_name = migrations) at /application/vendor/laravel/framework/src/Illuminate/Database/Connection.php: 664
I’m using Valet.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 23 (13 by maintainers)
Please try to ssh into docker and then run command composer dump
and clear config with below command
and then check again it should work.
Result of running
mysql is definitely the culprit.
docker-compose up -d
I don’t like the workarounds that much but PR are welcome.
To use it until the fix, just run
docker-compose up -d
before the migration