Skip to main content

MySQL

Experimental
Creates:
AssetsLineage

Configure in the UI

This plugin can be configured directly in the Marmot UI with a step-by-step wizard.

View Guide

The MySQL plugin discovers databases and tables from MySQL instances. It captures column information, row counts, and foreign key relationships for lineage.

Required Permissions

The user needs read access to the information schema:

CREATE USER 'marmot_reader'@'%' IDENTIFIED BY 'your-password';
GRANT SELECT ON your_database.* TO 'marmot_reader'@'%';
GRANT SELECT ON information_schema.* TO 'marmot_reader'@'%';

Example Configuration


host: "mysql-prod.internal"
port: 3306
user: "marmot_user"
password: "mysql_secure_pass"
database: "ecommerce"
tls: "true"
tags:
- "mysql"
- "ecommerce"

Configuration

The following configuration options are available:

PropertyTypeRequiredDescription
databasestringfalseDatabase name to connect to
discover_foreign_keysboolfalseWhether to discover foreign key relationships
external_links[]ExternalLinkfalseExternal links to show on all assets
hoststringfalseMySQL server hostname or IP address
include_columnsboolfalseWhether to include column information in table metadata
include_row_countsboolfalseWhether to include approximate row counts
passwordstringfalsePassword for authentication
portintfalseMySQL server port
table_filterplugin.FilterfalseFilter configuration for tables
tagsTagsConfigfalseTags to apply to discovered assets
tlsstringfalseTLS configuration (false, true, skip-verify, preferred)
userstringfalseUsername for authentication

Available Metadata

The following metadata fields are available:

FieldTypeDescription
character_setstringCharacter set
charsetstringCharacter set
collationstringTable collation
collationstringCollation
column_defaultstringDefault value
column_namestringColumn name
column_typestringFull column type definition
commentstringObject comment/description
commentstringColumn comment/description
constraint_namestringForeign key constraint name
createdstringCreation timestamp
data_lengthint64Data size in bytes
data_typestringData type
databasestringDatabase name
delete_rulestringDelete rule (CASCADE, RESTRICT, etc.)
enginestringStorage engine
hoststringMySQL server hostname
index_lengthint64Index size in bytes
is_auto_incrementboolWhether column auto-increments
is_nullableboolWhether null values are allowed
is_primary_keyboolWhether column is part of primary key
object_typestringObject type (table, view)
portintMySQL server port
row_countint64Approximate row count
schemastringSchema name
source_columnstringColumn in the referencing table
source_schemastringSchema of the referencing table
source_tablestringName of the referencing table
table_namestringObject name
target_columnstringColumn in the referenced table
target_schemastringSchema of the referenced table
target_tablestringName of the referenced table
update_rulestringUpdate rule (CASCADE, RESTRICT, etc.)
updatedstringLast update timestamp
versionstringMySQL version