Skip to Content
SourcesMySQL

MySQL

MySQL

Scan MySQL tables with detector-ready row sampling.

Category
Databases
Source type
MYSQL
Produces
table

MySQL — and MariaDB, which connects identically — is the database under a great many web applications, e-commerce platforms and internal tools. Connect it and Classifyre reads the values in your tables, so a column called notes that quietly accumulated customer identifiers is found for what it contains.

What you need to connect

Host, port, and a user with SELECT on the databases you want scanned. Nothing is ever written.

Managed MySQL (Amazon RDS and Aurora, Azure Database for MySQL, Google Cloud SQL, PlanetScale) works the same way. If your provider requires TLS, set the SSL mode accordingly and paste its CA certificate — that field is stored as a secret like any password.

What Classifyre reads

Tables across one database or every database the user can see, with a denylist for the ones you don’t want and an allowlist for the ones you do.

Shared behaviour · SQL databases

One asset per table or view, never one per row. The asset carries the table's structure — database, schema, table name, object type, its columns and their types, and a row-count estimate — and its content is a sample of real rows, formatted so a detector reads actual values rather than a schema dump.

How many rows, and which ones, is entirely up to the sampling strategy. Large tables are paged through by key rather than by OFFSET, so a scan that stops halfway can resume from where it left off instead of re-reading from the top.

Read-only throughout. The connector issues catalog queries and bounded SELECTs. Nothing is written back, and a read-only account is the right account to give it.

Relationships come out of the engine's own catalog: foreign keys are recorded as REFERENCE links — useful, but they move no data, so they never become a lineage hop, and a view and the tables it reads from are recorded as FLOW — real lineage, with column-level detail parsed out of the view's SQL where the SQL makes that possible. See Lineage.

Metadata on every asset

Asset kind · table

FieldTypeAlways presentWhat it is
databasestringYesDatabase or catalog name
table_namestringYesTable name
table_typestringYesObject type (TABLE/VIEW)
schemastringNoSchema name
columnsobject[]NoColumns as {name, type} objects
row_countintegerNoEstimated number of rows

Lineage

Lineage

Views and the tables behind them are recovered from MySQL’s own catalog and recorded as lineage, with column detail parsed from the view definition where it can be. Foreign keys become references — a useful map of how tables relate, but not a path data travels. See Lineage & Relationships.

Worth knowing

  • MySQL 8 authentication. Accounts using caching_sha2_password over an unencrypted connection need public-key retrieval allowed; there’s a setting for it. Using TLS is the better answer.
  • System databasesmysql, sys, information_schema, performance_schema — are excluded automatically.
  • MariaDB connects through the same driver and needs no special configuration.

Configuration

Beyond the fields below, every source also has the settings shared by all of them: the sampling strategy, the detectors to run, the scan schedule, and the compute limits for its scan jobs.

Required

Without these, the source will not save.

FieldTypeRequiredWhat it doesDefault
requiredobjectYesno extra properties
hoststringYesMySQL hostlocalhost
portintegerYesMySQL portmin 1, max 655353306

Secrets

Stored encrypted and never shown again after you save them. See Configuration & Fields.

FieldTypeRequiredWhat it doesDefault
maskedobjectYesno extra properties
passwordstringYesDatabase password
ssl_castringNoPEM-encoded CA certificate for SSL/TLS verification. Paste the full certificate content (-----BEGIN CERTIFICATE----- ... -----END CERTIFICATE-----). Required when ssl_mode is VERIFY_CA or VERIFY_IDENTITY.
usernamestringYesDatabase username

Optional

Everything you can tune. Sensible defaults apply when you leave them alone.

FieldTypeRequiredWhat it doesDefault
optionalobjectNono extra properties
connectionobjectNoConnection tuning for MySQL.no extra properties
connection.allow_public_key_retrievalbooleanNoAllow automatic RSA public key retrieval from the server for caching_sha2_password authentication (MySQL 8+). Only needed when not using SSL and connecting to MySQL 8 servers using the default authentication plugin.false
connection.connect_timeout_secondsintegerNoConnection timeout in secondsmin 1, max 12010
connection.ssl_modeenumNoSSL/TLS connection mode. DISABLED: no TLS; PREFERRED: TLS when available (default); REQUIRED: mandate TLS without certificate verification; VERIFY_CA: mandate TLS and verify the CA certificate (requires ssl_ca); VERIFY_IDENTITY: mandate TLS, verify CA, and verify server hostname. Allowed: DISABLED, PREFERRED, REQUIRED, VERIFY_CA, VERIFY_IDENTITYPREFERRED
scopeobjectNoDatabase and table selection scope.no extra properties
scope.databasestringNoSingle database to scan (optional when include_all_databases is true)
scope.exclude_databasesarrayNoDatabase denylist (exact database names)["information_schema","mysql","performance_schema","sys"]
scope.exclude_databases[]stringNo
scope.include_all_databasesbooleanNoScan all visible databases except excluded system databasesfalse
scope.include_tablesarrayNoOptional table allowlist. Accepted forms: table or database.table
scope.include_tables[]stringNo
scope.table_limitintegerNoOptional cap on number of table assets extracted per databasemin 1
Last updated on