Question

Got "permission denied for public schema" error in database but can't get the connection string in a provisioned database inside an app

I used a yaml file to create an app that runs my app and has a PostgreSQL database. However, during the deployment I got the error “permission denied for public schema”. I did some research and found this [page](How do I fix a “permission denied for schema public” error in PostgreSQL? | DigitalOcean Documentation) that suggests connecting to the database using psql to change the user privileges. But When I tried to get the connection parameters in the app panel it says " Connection details are unavailable while the database is being provisioned." What could I do now? I have no way to connect to the database to change the privileges to allow my app to connect to it. I did not see any way to set the privileges in the [app spec reference page](Reference for App Specification | DigitalOcean Documentation) either image alt text


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
February 13, 2025

Hi there,

It sounds like you’re using a dev database in the App Platform, which has restricted permissions. Specifically, you can’t create additional databases, you must use the default one that comes with the cluster. This is likely why you’re seeing the “permission denied for public schema” error.

To resolve this, make sure your app is connecting to the default database and not trying to create a new one. Unfortunately, dev databases don’t support modifying privileges, so if you need more control over roles and permissions, you might want to switch to a DigitalOcean Managed Database instead.

More details here: 🔗 https://docs.digitalocean.com/products/app-platform/details/limits/#database-limits

Let me know how it goes!

- Bobby

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.