0

I provisioned a server on Laravel Forge, where a Laravel application resides. On that same server, I have created 6 databases to be used by the Laravel app.

The issue now is that Laravel is unable to read/write from the other five databases. Rather, it defaults to the first connection; say "first_db_connection" - as the name of the first connection.

The databases are listed in the .env file as well as in the config/database.php file, with a general username and password. Running artisan commands in tinker on the project root directory, the databases are visible and print data to the window. All privileges are granted to all the databases.

This issue happens when a Node server makes a post request to the server. Accessing on the web or through API does not give these issues.

What am I missing? Any help would be appreciated.

1
  • It's unclear what the problem may be without any code. I suspect there's an issue in selecting the appropriate database but that's pure speculation on my end. Please try and provide a minimal, reproducible example Commented Dec 28, 2025 at 23:06

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.