Skip to content

Instantly share code, notes, and snippets.

@matuu
Last active July 8, 2016 15:30
Show Gist options
  • Save matuu/1b9f4e11c0dea6190255 to your computer and use it in GitHub Desktop.
Save matuu/1b9f4e11c0dea6190255 to your computer and use it in GitHub Desktop.

Revisions

  1. matuu revised this gist Jun 17, 2015. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions Postgres-create-user-db
    Original file line number Diff line number Diff line change
    @@ -12,3 +12,8 @@ postgres@debian: createdb jerry
    psql template1
    \password tom
    GRANT ALL PRIVILEGES ON DATABASE jerry to tom;


    import

    postgres@mimaquina $ psql jerry < dumpfile
  2. matuu renamed this gist Jun 22, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. matuu created this gist Jun 20, 2014.
    14 changes: 14 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    Option 1
    su - postgres
    psql template1
    CREATE USER tom WITH PASSWORD 'myPassword';
    CREATE DATABASE jerry;
    GRANT ALL PRIVILEGES ON DATABASE jerry to tom;

    Option 2:
    su postgres
    postgres@debian: createuser tom
    postgres@debian: createdb jerry
    psql template1
    \password tom
    GRANT ALL PRIVILEGES ON DATABASE jerry to tom;