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

ahmeda's avatar

How to connect to DB using digitalocean app platform?

I upload my Laravel app to digital ocean app platform (new one) and set my env vars, and the database that creates with DB name when the app is finished deploying I just open the app and it shows 500 Server Error And it's DB Connection!

0 likes
6 replies
ahmeda's avatar

@jlrdw Exactly, but always says ( 500 Server Error ) even the database has been created with the default app!

goeki85's avatar

@jlrdw Maybe you have the exact same problem like the author described in the article linked by @snapey

"Once the initial deployment finished I jumped on over to the automatically provisioned URL. My first deployment was 500ing because I forgot to set the database driver to pgsql, but after updating the environment variables (which automatically redeploys the app) the app was able to connect to the DB."

Have you changed your environment variables from mysql to pgsql?

ahmeda's avatar

@shakierfary Humm! First time hear about this! I just ask cuz I have in my project some SQL query, so I thought it will be some issue with pgsql!

Please or to participate in this conversation.