This section of the docs describes the steps necessary in order to add a database to DbRhino.

1. Create the Master Database User

The first thing needed is to create a master user for DbRhino to use. This is the user the DbRhino Agent will use in order to connect to the database, create the users, and grant them permissions. Generally, this user will need to have broad permissions within your database, like the permission to create new users as well as read/write permissions on all the objects in the database.


To create the master user in a PostgreSQL database, you must create a new superuser. Doing so permits the DbRhino Agent to grant permissions across all of your databases. The command to create this user is

CREATE ROLE dbrhino_master LOGIN SUPERUSER ENCRYPTED PASSWORD 'create-a-password';

PostgreSQL (RDS)

If you are using AWS Relational Database Service (RDS), permissions work a bit differently than in vanilla PostgreSQL. The command to create a superuser is

CREATE ROLE dbrhino_master LOGIN CREATEROLE IN ROLE rds_superuser ENCRYPTED PASSWORD 'create-a-password';


The Redshift command to create the DbRhino master user is

CREATE USER dbrhino_master CREATEUSER PASSWORD 'create-a-password';

This creates a new user that has the ability to create other users. Within Redshift, this command effectively creates a new superuser.


The MySQL commands to create a user the DbRhino agent can use to create other users and grant them permissions is

CREATE USER `dbrhino_master`@`%` IDENTIFIED BY 'create-a-password';
GRANT ALL ON *.* TO `dbrhino_master`@`%` WITH GRANT OPTION;

Adding a New Database

Once you have created the DbRhino user, go here to add the database details to DbRhino. After choosing the type of database you are adding, you must add the host, port, and user details. The host should be relative to where your agent is installed. For example, if you installed the DbRhino agent within your private network, the host should be the IP of the database within this network.

If you are adding a PostgreSQL or Redshift database, you must also specify one or more databases the agent may connect to.