Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

YCHDev's avatar

Deleted "forge" db, refusing to connect now

This Laravel app does not use a database - never ran php artisan migrate, and it was working just fine until deleting the "forge" db... now it's "refusing to connect" when you visit the page.

Update I created a new db and db user, configured in .env, cleared config, migrated, restarted nginx and it works now. Thanks Cronix!

0 likes
3 replies
SomeT's avatar

Have you used Git or file versioning or anything like that? Or you could do a new laravel project and just re insert the database files, if you are not using them it don't really matter as long as it makes the rest of your app work. Sorry if thats not a very specific solution.

1 like
Cronix's avatar

You might not have been "using" the database, but you had the connection set up, so it tries to connect to it on every request.

You can try setting the database to null in /config/database.php

'default' => null,

I just tried it on my site (serving static content) and it worked except when trying to fill out the contact form, which saves the contact info to the database, but it worked on all other pages that were serving static content.

Cronix's avatar
Cronix
Best Answer
Level 67

Another option is to go into the forge control panel, go to the affected server, and recreate the forge db using the same user/password in the MySQL section of the server details.

1 like

Please or to participate in this conversation.