Docs
Connections

MySQL

Connect MySQL 8.0+ or MariaDB 10.6+ over verified TLS with a read-only user, and how column types and time zones map.

A MySQL connection works like PostgreSQL. It connects through a pinned address over verified TLS, reads inside a read-only transaction, and streams bounded reads. It supports MySQL 8.0 and later, and MariaDB 10.6 and later.

Availability

MySQL is not yet generally available on xentropy.ai. Contact support@xentropy.ai to request access. Until it is enabled for your account, it does not appear in the catalogue and its reads fail with PROVIDER_DISABLED.

Before you start

  • The server must be reachable on a public hostname, with TLS enabled and a certificate that names that hostname. For a private CA, have the CA certificate ready. Xentropy requires TLS 1.2 or later.
  • Allow the egress IP addresses shown in the form in your firewall, and in the user's host rule.
  • Use caching_sha2_password or mysql_native_password. Xentropy refuses the mysql_clear_password plugin.

The form shows SQL for a read-only user, filled in with your database name:

CREATE USER 'xentropy_reader'@'%' IDENTIFIED WITH caching_sha2_password BY 'replace-with-a-strong-password' REQUIRE SSL;
GRANT SELECT, SHOW VIEW ON your_database.* TO 'xentropy_reader'@'%';

Set up the connection

Open Connections, choose New connection, then MySQL.
Name the connection. Optionally paste a mysql:// connection string and choose Fill fields.
Enter the host, port (default 3306), database, username and password. If you use a private CA, paste its certificate.
Set the DATETIME time zone: the IANA zone your DATETIME values are written in (default UTC).
Choose Test and list relations, select the relations to read (up to 100), then choose Save connection.

In MySQL a schema is a database, so relations are listed as database.table. Discovery reads information_schema.TABLES, which shows only tables and views the user has a privilege on. It excludes mysql, information_schema, performance_schema and sys, and lists up to 500 relations. Database and table names can have up to 64 characters, including spaces, but not a dot, slash, backslash, backtick or control character. Every name is quoted with backticks in the SQL Xentropy sends. When you type a name with other characters than letters, digits and _, put it in double quotes, for example shop."order items". When you save, Xentropy probes every selected relation with a zero-row SELECT.

How reads stay read-only

Each session runs these statements, in order:

  1. SET SESSION time_zone = '+00:00'
  2. SET SESSION TRANSACTION READ ONLY
  3. START TRANSACTION READ ONLY

Reads are single SELECT statements with a server-side time limit: MAX_EXECUTION_TIME on MySQL, or SET STATEMENT max_statement_time on MariaDB. A client deadline also applies. Multiple statements and LOAD DATA LOCAL are disabled, so a server can never pull files from the client.

Type mapping

MySQL typeDataset type
TINYINT(1) / BOOLEANboolean by default. Set the configuration field tinyIntBoolean: false (API or MCP) to read it as a number
TINYINT, SMALLINT, MEDIUMINT, INT, FLOAT, DOUBLE, YEARnumber
BIGINT, DECIMALdecimal (exact, as text)
DATEdate
DATETIMEdatetime, read in the connection's time zone and returned in UTC
TIMESTAMPdatetime (UTC)
JSONFlattened. A column whose values are all objects becomes dotted fields such as attrs.color (up to 4 levels). Lists and mixed values stay one field, as JSON text
CHAR, VARCHAR, TEXT, ENUM, SET, TIMEstring
BLOB, BINARY, VARBINARY, BIT, GEOMETRY, VECTORexcluded

Zero dates such as 0000-00-00 are read as empty values, and the read carries a ZERO_DATE_NULLED warning with the field and count. Primary-key and unique constraints become the grain. Foreign keys to other selected relations become relationships.

Filters are pushed down for plain columns, with the same operators as PostgreSQL. Fields flattened from JSON are filtered after the read.

Limits

LimitValue
Rows per read50,000
Data per read5 MiB
Readable fields100, including flattened JSON fields
Statement budget25 s
Read deadline30 s
Connect timeout10 s
Metadata and verification statements10 s
Relations listed / selected500 / 100

Errors

CodeCauseWhat to do
MYSQL_DNSThe host does not resolveCheck the spelling, and use the public hostname
MYSQL_NETWORK_POLICYThe host resolves to a private or reserved address (403)Use the public hostname, or ask your administrator to allow it
MYSQL_TCPNo connection, or the connection was lost (503)Check the port and firewall, and allow the egress IPs
MYSQL_TLSThe server does not support TLS, or its certificate does not verify for the hostEnable TLS, paste the CA, and check that the certificate names the host
MYSQL_AUTHWrong password; the user may not connect from Xentropy's address or with this auth mode; the database is unknown or not allowed; or the server asked for a clear-text passwordCheck the credentials and host rule, and use caching_sha2_password
MYSQL_PERMISSIONA selected table cannot be read, or does not existGrant SELECT, or deselect it
INCOMPLETE_DATAThe relation has more than 50,000 rows, or exceeds 5 MiBSelect a bounded view
LIMIT_EXCEEDEDMore than 100 readable fieldsSelect a view with fewer columns
BUDGET_EXCEEDEDThe query ran past its 25 s statement budgetSelect a smaller or indexed view
PROVIDER_UNAVAILABLEThe metadata read or the read failed for another reasonRetry later, then check connection health

On this page