diff --git a/doc/postgres-create-user.md b/doc/postgres-create-user.md index e3fe87f..0e15ee8 100644 --- a/doc/postgres-create-user.md +++ b/doc/postgres-create-user.md @@ -1,35 +1,35 @@ # Create User with Postgres -* create a database user called with password +* create a database user called `user name` with password `key` ``` -CREATE USER with encrypted password ''; +CREATE USER `user name` with encrypted password 'key'; ``` -* OPTION: gant user access to database +* OPTION: gant user `user name` access to database `database name` ``` GRANT ALL PRIVILEGES ON DATABASE TO ; ``` -* OPTION: add all privileges for a to a +* OPTION: add all privileges for a `schema name` to a `user` ``` GRANT ALL PRIVILEGES ON ALL TABALES ON SCHEMA TO ; ``` -* OPTION: if already exist, pw can be changed this way +* OPTION: if `user name` already exist, pw can be changed this way ``` ALTER USER WITH ENCRYPTED PASSWORD ''; ``` -* OPTION: gant user access to database ```postgres``` so that this user is able to login without providing a database +* 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 ; ``` -* OPTION: gant user permission to create databases +* OPTION: gant user `user name` permission to create databases ``` sudo -u postgres psql -W -ALTER USER CREATEDB; +ALTER USER CREATEDB; ``` * edit the pg_hba.conf file\