m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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