Skip to content

MySQL

Connect a MySQL database, or any engine that speaks the MySQL wire protocol, for federated analysis. Tables are mounted into the query engine and can be joined with datasets from other connectors.

When to use

  • Operational MySQL databases (application backends, reporting replicas).
  • MySQL protocol–compatible engines: TiDB, StarRocks, and Doris connect through this connector with no additional configuration — point it at the engine's MySQL-protocol endpoint.

For analytical workloads, prefer a read replica over the primary so long-running queries do not compete with production traffic.

Before you begin

Prepare a database account with:

  • Read-only privileges (SELECT) on the schemas and tables you intend to analyze.
  • Network connectivity from Datyo to the database. If the database is behind a firewall or in a private network, allow inbound access from the service, or expose a replica that can be reached.

Connection settings

FieldRequiredDescription
HostYesDatabase hostname or address, e.g. db.example.com.
PortYesDefault 3306.
UserYesAccount name. A read-only account is recommended.
PasswordYesStored encrypted; never shown after saving.
DatabaseYesThe schema to connect.

Test and save

Select the type, enter the fields, and use Test connection. On success the dataset is saved and moves through "syncing → connected". A failure shows the specific reason — most often an incorrect credential, an unreachable host, or a missing privilege.

After connecting, choose the tables to import. Datyo reads each table's structure and a sample of rows.

Capabilities

  • Execution model: Federated. MySQL tables can be joined with datasets from other connectors in one query.
  • Access: Read-only. Write statements are rejected.
  • Identifier quoting: Generated SQL uses standard quoting; mixed-case and reserved-word identifiers are handled.

Troubleshooting

  • Test connection fails — verify host and port reachability, the account and password, and that the named database exists and is visible to the account.
  • A table is missing after import — confirm the account has SELECT on it; objects the account cannot see are not listed.
  • Queries are slow or affect production — connect a read replica instead of the primary.

Improve answer accuracy

  • Add column descriptions so the Agent maps business terms to the right fields.
  • Re-sync after a schema change so the Agent reads the current structure.

Datyo · The Agent-native intelligent data analytics platform