How to create a read-only user in the backend PostgreSQL database?
1. Connect to the backend PostgreSQL database where Applications Manager database (AMDB) is stored.
Use the Postgres user for connection. For more details, refer
this link.
2. After connecting to the PostgreSQL database, execute the following queries:
- create user readonly password 'test';
- alter user readonly set default_transaction_read_only = on;
- \c amdb;
- grant usage on schema public to readonly;
- grant select on all tables in schema public to readonly;
After executing the above queries, you can connect to Applications Manager database (AMDB) using the new 'readonly' user and verify the connection.
New to ADSelfService Plus?