From: Will Budicm Date: Sat, 5 Dec 2020 01:18:41 +0000 (+1100) Subject: dbi:PG string for expected user defaults. X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=ec64491435adb0f1cbf71f877877dd795ce5d621;p=LifeLog.git dbi:PG string for expected user defaults. --- diff --git a/Installation_ProgresSQL.txt b/Installation_ProgresSQL.txt index 83fbd5a..c3474b1 100644 --- a/Installation_ProgresSQL.txt +++ b/Installation_ProgresSQL.txt @@ -50,9 +50,10 @@ sudo apt install libpq-dev sudo cpan DBD::Pg; -# To assign default Postgres SQL user and test db +# To assign default Postgres SQL user roles. sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" -sudo -u postgres psql -c "CREATE DATABASE testdb;" +sudo -u postgres psql -c "CREATE ROLE lifelog WITH LOGIN SUPERUSER CREATEDB CREATEROLE INHERIT NOREPLICATION CONNECTION LIMIT -1 PASSWORD 'xxxxxxx'"; +sudo -u postgres psql -c "CREATE DATABASE lifelog;" ## Start stop Postgres SQL sudo service postgresql start