Forums

Dropped default Postgres database

I created a new Postgres database for my app. After verifying that it was working, I dropped the default Postgres db named "Postgres". Now, every time I open the Postgres console, I get an error:

"psql: FATAL: database "postgres" does not exist Console closed."

How can I open a psql console with my new database?

You can connect to your database server by specifying the template1 database like this:

psql -h <db_address> -p <db_port> -U super -W template1

and then you can re-create your 'postgres' database with

create database postgres;

Thank you!