MySQL

Supported Relational databases

Catalog databases, tables, views, columns, keys, stored procedures and functions, with SQL lineage from views, routines and query history.

Capabilities

CapabilitySupportNotes
Tables, views & columns Supported
Keys, constraints & indexes Supported
Procedures & functions Supported
Data lineage Supported
Lineage from query history Supported Statements collected from performance_schema.
Business glossary links Supported
Data quality probes Supported
Data profiling Supported
Data classification Supported
Chat with your data Supported

Connection settings

Create the connection on the Blindata Agent from Settings > Agents > Connections with the connection wizard, choosing MySQL in the technology step.

Driver classcom.mysql.cj.jdbc.Driver
JDBC URLjdbc:mysql://localhost:3306/mysql
Authentication
Service principal (shared technical user)
User principal (personal credentials, BYOC)
Ephemeral credentials (asked at each run)
Crawling strategySQL

The driver is included in the Blindata Agent: no installation is needed. Driver properties can be added under Advanced settings in the connection wizard.

Prerequisites & permissions

  • A Blindata Agent installed with network access to MySQL.
  • A read-only user with SELECT on information_schema (granted by default for visible objects).
  • SHOW VIEW to read view definitions and SHOW_ROUTINE (MySQL 8.0.20+) or SELECT on mysql.proc to read routine bodies.
  • SELECT on performance_schema for query history.
  • SELECT on tables for data quality, profiling and Chat with your data.

Set up metadata crawling

  1. Create the connection to MySQL on the agent (see Connection settings) and use Test to verify it.
  2. Create or open the system that represents MySQL in the catalog and link it to the connection.
  3. In the CRAWLING tab add a crawling job with strategy SQL and, if needed, replace the default queries with the ones suggested below.
  4. Run a TEST to check the number of extracted objects, then RUN or schedule the job.

The job options and the column aliases of every extraction query are described in the Generic JDBC reference.

Suggested extraction queries

The default SQL strategy queries on information_schema work out of the box for tables, views, columns and constraints. Use the following routines query to also import routine parameters, needed for table-valued function lineage.

Routines query

information_schema.routines does not include parameters. They live in information_schema.parameters. select * from information_schema.routines is still valid for identity and body; for table-valued function argument lineage add ROUTINE_PARAMETERS (MySQL 8+):

SELECT
  r.SPECIFIC_NAME,
  r.ROUTINE_CATALOG,
  r.ROUTINE_SCHEMA,
  r.ROUTINE_NAME,
  r.ROUTINE_TYPE,
  r.ROUTINE_DEFINITION,
  (
    SELECT COALESCE(
      JSON_ARRAYAGG(
        JSON_OBJECT(
          'name', p.PARAMETER_NAME,
          'dataType', COALESCE(p.DTD_IDENTIFIER, p.DATA_TYPE),
          'positionIndex', p.ORDINAL_POSITION - 1
        )
        ORDER BY p.ORDINAL_POSITION
      ),
      CAST('[]' AS JSON)
    )
    FROM information_schema.PARAMETERS p
    WHERE p.SPECIFIC_SCHEMA = r.ROUTINE_SCHEMA
      AND p.SPECIFIC_NAME = r.SPECIFIC_NAME
      AND UPPER(COALESCE(p.PARAMETER_MODE, 'IN')) IN ('IN', 'INOUT')
      AND p.PARAMETER_NAME IS NOT NULL
      AND p.PARAMETER_NAME <> ''
  ) AS ROUTINE_PARAMETERS
FROM information_schema.ROUTINES r
WHERE r.ROUTINE_SCHEMA NOT IN ('information_schema', 'mysql', 'performance_schema', 'sys');

Lineage from query history

The agent can periodically extract executed statements from MySQL and send them to Blindata, where the SQL lineage engine turns them into dataflows. See the ready-made extraction query in Scheduling and statements extraction.