Home / Product FAQ / Miscellaneous / How can I create a new readonly user in the PostgreSQL database?

How can I create a new readonly user in the PostgreSQL database?


Here is how you can create a new read-only user account in the backend postgresql database:

  • Connect to backend Postgresql database where Applications Manager database (AMDB) is stored. Use the Postgres user for connection as mentioned in the steps in below link:
https://apm.manageengine.com/connecting-to-Applications-Managers-bundled-database.html
  • After connecting to backend 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 AppManager database (AMDB) using the new user 'readonly' and verify the connection.



     RSS of this page