Skip to main content

Steps

1. Create a User

  1. Go to the SQL Console
  2. Create a user named KUBIT. The Kubit team will generate and share a strong password which you should use to create the user.
CREATE USER KUBIT IDENTIFIED WITH sha256_password BY '*****';

2. Create Roles

  1. Create a role named KUBIT_R
    CREATE ROLE OR REPLACE KUBIT_R;
    
  2. Create a role named KUBIT_W
    CREATE ROLE OR REPLACE KUBIT_W;
    

3. Create a Database

Create a database named KUBIT_DB
CREATE DATABASE KUBIT_DB;

4. Grant Permissions

  1. Grant KUBIT_W the permissions to read and write from KUBIT_DB database. This will allow us to create any auxiliary tables or views there
GRANT SELECT,INSERT,ALTER,CREATE,DROP,TRUNCATE,SHOW,CLUSTER ON KUBIT_DB.* TO KUBIT_W;
  1. Add read-only (SELECT) permissions to the KUBIT_R role to the intended tables/views and KUBIT_DB
GRANT SELECT ON KUBIT_DB TO KUBIT_R;
GRANT SELECT ON table/view TO KUBIT_R;

5. Setup IP Whitelisting

Here’s the list of Kubit’s IP addresses to allow.

Best Practice

Create one more user, roles and service for development purposes in order to isolate the impact on the production environment and avoid accidents.

What’s Next