Read Only User
This page describes how to create a read-only MySQL/MariaDB user. Through this user you will be sure that the agent will not be able to even unintentionally modify any data in your PostgreSQL database.
Create a new user
In order to create a new read-only user you need to login
Assumption
The following SQL statements assume that the user name is coordimap_readonly.
Add needed GRANTs
MySQL/MariaDB v14
If you are using MySQL/MariaDB v14 you can run the following SQL
Please check pg_read_all_data for more information.
Postgres v9 - v13
Substitute the following variables in the coming SQL statements
- DATABASE_NAME: use the real name of the database
- SCHEMA_NAME: use the specific schema name
Allow the user to connect to the database.
Allow the user to use the specified schema.
Give SELECT
permissions on all the tables of the schema public.
Grant SELECT
permissions to new tables that are created.