Skip to content

Instantly share code, notes, and snippets.

@ronanguilloux
Created June 16, 2013 19:41
Show Gist options
  • Save ronanguilloux/5793147 to your computer and use it in GitHub Desktop.
Save ronanguilloux/5793147 to your computer and use it in GitHub Desktop.
Elcaro tutorial tip: Postgtresql new user & db creation
$ sudo apt-get install postgresql
$ sudo -i -u postgres
$ psql
CREATE USER elcaro;
ALTER ROLE elcaro WITH CREATEDB;
CREATE DATABASE "ElCaro" OWNER elcaro;
ALTER USER elcaro WITH ENCRYPTED PASSWORD 'elcaro';
\q
$ postgres@computer:~$ exit
$ cd /path/to/elcaro
$ psql -U elcaro -d ElCaro -f sql/structure.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment