Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 11: DB_URL instead of DATABASE_URL #45

Open
chimobi-justice opened this issue Aug 6, 2024 · 0 comments
Open

Laravel 11: DB_URL instead of DATABASE_URL #45

chimobi-justice opened this issue Aug 6, 2024 · 0 comments

Comments

@chimobi-justice
Copy link

### Description:

When deploying a Laravel 11 application on (render.com), I encountered an issue with the database connection. The DATABASE_URL environment variable, which was previously used in earlier Laravel versions, has been replaced with DB_URL in Laravel 11.

To resolve this, update your (render.com) environment variables to use DB_URL instead of DATABASE_URL. This change will allow your Laravel 11 application to connect to the database successfully.

### Steps to reproduce:

  1. Deploy a Laravel 11 application on (render.com)
  2. Set the DATABASE_URL environment variable
  3. Run database migrations or try to access the database

### Expected behavior:

The application should connect to the database using the DB_URL environment variable.

### Actual behavior:

The application fails to connect to the database, throwing a Connection refused error.

### Solution:

Update the environment variable to DB_URL and redeploy your application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant