diff options
author | Marcin Chrzanowski <m@m-chrzan.xyz> | 2022-12-21 01:12:43 +0100 |
---|---|---|
committer | Marcin Chrzanowski <m@m-chrzan.xyz> | 2022-12-21 01:12:43 +0100 |
commit | af9caca6271a1bd768b10418bd75816b4cf6b5c3 (patch) | |
tree | 1b2356555a51e76d27840ae29c1a987d51f163b3 | |
parent | 73552dae74e2a7806da148c8b6c72d15bdd99960 (diff) |
Add PostgreSQL stuff
-rw-r--r-- | postgres.md | 24 |
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 |