Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to CREATE DATABASE postgresql on Heroku Hobby database

I connected to Heroku postgresql DB (Hobby env): heroku pg:psql --app

The prompt shows : appname::DATABASE=>

Error : appname::DATABASE=> CREATE DATABASE hello ENCODING 'UTF-8';

ERROR: permission denied to create database

Any help regarding this will be appreciated.

like image 884
Rahul Saxena Avatar asked Sep 18 '25 22:09

Rahul Saxena


1 Answers

Creating a database is disallowed because it's unnecessary. When you provision a Heroku Postgres add-on, the database and user are created on your behalf. You can see the information by running heroku config and checking the database configuration string.

like image 54
RangerRanger Avatar answered Sep 23 '25 08:09

RangerRanger