php artisan migrate command gives an error and not creating db tables as expected
I'm a newbie running laravel 8 on Docker and try to create tables on db, it gives following error.
This application running as expected before but had to destroy images to switch to another project. now I cannot create default tables using php artisan migrate command.
Illuminate\Database\QueryException
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = example_app and table_name = migrations and table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
Show your env (db section) as tray said and your docker-compose.yml. It's important that the host is the internal name of the mysql container, not 127.0.0.1 or localhost
How did you run the migrate command? Inside the container?