Run php artisan migrate --force
Illuminate\Database\QueryException
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = forge and table_name = migrations and table_type = 'BASE TABLE')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
667▕ // If an exception occurs when attempting to run a query, we'll format the error
668▕ // message to include the bindings with SQL, which will make this exception a
669▕ // lot more helpful to the developer instead of just the database's errors.
670▕ catch (Exception $e) {
➜ 671▕ throw new QueryException(
672▕ $query, $this->prepareBindings($bindings), $e
673▕ );
674▕ }
675▕
+39 vendor frames
40 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
Error: Process completed with exit code 1.
is there something I'm missing? when i run PHP artisan migrate after ssh into my server. it runs with no issues. i wonder that I'm missing. every connection in my env works fine.
interesting. I'm not even using forge. my app is hosted on D.O, and i use buddy as one of the CD pipelines. then i guess the problem is that GitHub isn't able to access my database right? any tips or ways i can make GitHub connect to the database?
First I need to understand, why it should connect to your database? I assume you just need to run tests ? It should have its own database to test on :)
I do not run or write tests. I'm not an expert. but when i create new tables or edit tables on the dev machine? i want it to run new migrations when the code is pushed to the production environment.