feat: adjust postgres-create-user.md

This commit is contained in:
dancingCycle 2022-09-05 11:51:14 +02:00
parent 586a16e0fd
commit e434cb5e7a
2 changed files with 16 additions and 0 deletions

View File

@ -14,3 +14,7 @@
* [Postges](../doc/postgres.md)
* [Java](../doc/java.md)
* [OneBusAway](../doc/onebusaway.md)
## To-do List
* Reuse

View File

@ -11,6 +11,18 @@ CREATE USER <user name> with encrypted password <key>;
grant all privileges on database <database name> to <user name>;
```
* OPTION: gant user <user_name> access to database ```postgres``` so that this user is able to login without providing a database
```
sudo -u postgres psql -W
grant all privileges on database postgres to <user name>;
```
* OPTION: gant user <user_name> permission to create databases
```
sudo -u postgres psql -W
ALTER USER <user_name> CREATEDB;
```
* edit the pg_hba.conf file\
NOTE: Insert the postgresql database version that is running on the respective host
```