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_passwordormysql_native_password. Xentropy refuses themysql_clear_passwordplugin.
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
mysql:// connection string and choose Fill fields.3306), database, username and password. If you use a private CA, paste its certificate.DATETIME values are written in (default UTC).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:
SET SESSION time_zone = '+00:00'SET SESSION TRANSACTION READ ONLYSTART 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 type | Dataset type |
|---|---|
TINYINT(1) / BOOLEAN | boolean by default. Set the configuration field tinyIntBoolean: false (API or MCP) to read it as a number |
TINYINT, SMALLINT, MEDIUMINT, INT, FLOAT, DOUBLE, YEAR | number |
BIGINT, DECIMAL | decimal (exact, as text) |
DATE | date |
DATETIME | datetime, read in the connection's time zone and returned in UTC |
TIMESTAMP | datetime (UTC) |
JSON | Flattened. 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, TIME | string |
BLOB, BINARY, VARBINARY, BIT, GEOMETRY, VECTOR | excluded |
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
| Limit | Value |
|---|---|
| Rows per read | 50,000 |
| Data per read | 5 MiB |
| Readable fields | 100, including flattened JSON fields |
| Statement budget | 25 s |
| Read deadline | 30 s |
| Connect timeout | 10 s |
| Metadata and verification statements | 10 s |
| Relations listed / selected | 500 / 100 |
Errors
| Code | Cause | What to do |
|---|---|---|
MYSQL_DNS | The host does not resolve | Check the spelling, and use the public hostname |
MYSQL_NETWORK_POLICY | The host resolves to a private or reserved address (403) | Use the public hostname, or ask your administrator to allow it |
MYSQL_TCP | No connection, or the connection was lost (503) | Check the port and firewall, and allow the egress IPs |
MYSQL_TLS | The server does not support TLS, or its certificate does not verify for the host | Enable TLS, paste the CA, and check that the certificate names the host |
MYSQL_AUTH | Wrong 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 password | Check the credentials and host rule, and use caching_sha2_password |
MYSQL_PERMISSION | A selected table cannot be read, or does not exist | Grant SELECT, or deselect it |
INCOMPLETE_DATA | The relation has more than 50,000 rows, or exceeds 5 MiB | Select a bounded view |
LIMIT_EXCEEDED | More than 100 readable fields | Select a view with fewer columns |
BUDGET_EXCEEDED | The query ran past its 25 s statement budget | Select a smaller or indexed view |
PROVIDER_UNAVAILABLE | The metadata read or the read failed for another reason | Retry later, then check connection health |