]> lifelog.hopto.org Git - LifeLog.git/commitdiff
dbi:PG string for expected user defaults.
authorWill Budicm <redacted>
Sat, 5 Dec 2020 01:18:41 +0000 (12:18 +1100)
committerWill Budicm <redacted>
Sat, 5 Dec 2020 01:18:41 +0000 (12:18 +1100)
Installation_ProgresSQL.txt

index 83fbd5a3d100279e82de3ee488bd1a25f6d0ece1..c3474b11a2c0515c11bb4ec22b2d41b9cd348d1b 100644 (file)
@@ -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