mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 13:13:50 +01:00
Update postgres.md (#6234)
Added database owner authentication with `sudo` when `su` does not work
This commit is contained in:
parent
22a9f75097
commit
0327a00a37
1 changed files with 7 additions and 3 deletions
|
@ -27,17 +27,21 @@ connect to a postgres database.
|
||||||
|
|
||||||
## Set up database
|
## Set up database
|
||||||
|
|
||||||
Assuming your PostgreSQL database user is called `postgres`, create a
|
Assuming your PostgreSQL database user is called `postgres`, first authenticate as the database user with:
|
||||||
user `synapse_user` with:
|
|
||||||
|
|
||||||
su - postgres
|
su - postgres
|
||||||
|
# Or, if your system uses sudo to get administrative rights
|
||||||
|
sudo -u postgres bash
|
||||||
|
|
||||||
|
Then, create a user ``synapse_user`` with:
|
||||||
|
|
||||||
createuser --pwprompt synapse_user
|
createuser --pwprompt synapse_user
|
||||||
|
|
||||||
Before you can authenticate with the `synapse_user`, you must create a
|
Before you can authenticate with the `synapse_user`, you must create a
|
||||||
database that it can access. To create a database, first connect to the
|
database that it can access. To create a database, first connect to the
|
||||||
database with your database user:
|
database with your database user:
|
||||||
|
|
||||||
su - postgres
|
su - postgres # Or: sudo -u postgres bash
|
||||||
psql
|
psql
|
||||||
|
|
||||||
and then run:
|
and then run:
|
||||||
|
|
Loading…
Reference in a new issue