m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <m@m-chrzan.xyz>2022-12-21 01:12:43 +0100
committerMarcin Chrzanowski <m@m-chrzan.xyz>2022-12-21 01:12:43 +0100
commitaf9caca6271a1bd768b10418bd75816b4cf6b5c3 (patch)
tree1b2356555a51e76d27840ae29c1a987d51f163b3
parent73552dae74e2a7806da148c8b6c72d15bdd99960 (diff)
Add PostgreSQL stuff
-rw-r--r--postgres.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/postgres.md b/postgres.md
new file mode 100644
index 0000000..28a0043
--- /dev/null
+++ b/postgres.md
@@ -0,0 +1,24 @@
+# The PostgreSQL DBMS
+
+Default user, db: `postgres`
+
+## User management
+
+Everything should be done as user `postgres`.
+
+New user:
+
+ createuser --pwprompt mypguser
+
+Change password:
+
+ # in `psql`
+ ALTER ROLE user WITH PASSWORD 'xxx';
+
+## New database
+
+ sudo su postgres
+ createdb -O mypguser mypgdatabase
+
+ # delete db
+ dropdb mypgdatabase