Minimum Permissions for Ingestion on MySQL and PostgreSQL Databases

Original Slack Thread

<@U06TM7M40RK> what should be the minimum permission for the user of MySQL database to run ingestion on MySQL database?

To run ingestion on a MySQL database using DataHub, the user needs to have specific permissions. According to the <https://datahubproject.io/docs/0.14.0/generated/ingestion/sources/mysql|DataHub MySQL ingestion documentation>, the following privileges are required:

  1. SELECT: This permission is necessary to view the table structure and perform profiling.

    GRANT SELECT ON DATABASE.* TO 'USERNAME'@'%';
    
  2. SHOW VIEW: This permission is needed to access views within the database.

    GRANT SHOW VIEW ON DATABASE.* TO 'USERNAME'@'%';
    

These permissions ensure that the user can access the necessary metadata and perform the required operations for data ingestion.

Would you like more details on how to configure these permissions or any other aspect of the ingestion process?

Sources:

<@U06TM7M40RK> what should be the minimum permission for the user of postgres database to run ingestion on postgres database?

To run ingestion on a PostgreSQL database using DataHub, the user needs specific permissions. According to the <https://datahubproject.io/docs/0.14.0/generated/ingestion/sources/postgres|Postgres Ingestion Source documentation>, the following permissions are required:

  1. USAGE: This permission is necessary on the schemas you want to ingest. It allows the user to access the schema and its objects.

    GRANT USAGE ON SCHEMA schema_name TO datahub_user;
    
  2. SELECT: This permission is required on the tables for which you want to perform column-level profiling. It allows the user to read data from the tables.

    GRANT SELECT ON ALL TABLES IN SCHEMA schema_name TO datahub_user;
    

These permissions ensure that the user can access the necessary metadata and perform the required operations for data ingestion.

Would you like more detailed steps or further clarification on any specific part of the process?

Sources:

Hi :slight_smile: ! Did this interaction resolve your issue or do you still require assistance ?

Please tag @ RunLLM if you still need further assistance !

Or tag @Datahub Community Support if you require a person to take a look :slight_smile:

Hope this helps ! ><