George V. Reilly

Creating a New PostgreSQL Database at RDS

Many of us are guilty of saying “database” when we mean a database server or a DBMS. A database is a collection of tables storing related data, schemas, stored procs, and per­mis­sions. Most database servers are capable of managing many databases si­mul­ta­ne­ous­ly.

I needed to create a new PostgreSQL database at Amazon’s RDS last week. I already had an RDS instance; I needed a new database on that instance. My Google searches turned up various recipes for creating a new RDS instance.

The following worked for me:

psql --host=SOME-DBMS-HOST --dbname EXISTING_DB \
     --username=YOUR-USERNAME --password \
     --command="CREATE DATABASE new_database WITH OWNER some_owner"
blog comments powered by Disqus
Review: The Prisoner of Zenda » « reStructuredText Nested Markup