Connectors
MySQL and MariaDB
MySQL and MariaDB connector configuration options and limitations.
MySQL and MariaDB
MySQL and MariaDB are supported as separate connectors. Select the connector that matches your server.
Supported Versions
| Database | Minimum Tested Version |
|---|---|
| MySQL | 8.4 |
| MariaDB | 10.7 |
These are the lowest versions tested against Monospace. Older versions are untested and may not work.
Connection Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
host | string | Yes | — | Database server hostname or IP address |
port | number | Yes | — | Database server port |
user | string | Yes | — | Database username |
password | string | Yes | — | Database password |
dbname | string | No | — | Database name |
ssl.mode | string | No | — | SSL connection mode |
ssl.ca_cert | string | No | — | CA certificate (base64-encoded PEM or DER) |
Alternatively, paste a connection string to auto-populate fields:
MySQL
mysql://user:password@host:3306/database
MariaDB
mariadb://user:password@host:3306/database
The MySQL connector accepts mysql://. The MariaDB connector accepts mariadb://.
Use the sslmode query parameter in the URL to set ssl.mode.
SSL Modes
| Mode | Description |
|---|---|
disable | No TLS encryption |
prefer | Not supported. Choose disable, require, verify-ca, or verify-full |
require | Require TLS without certificate verification. If ssl.ca_cert is provided, verifies the server certificate against it |
verify-ca | Require TLS and verify the server certificate chain against ssl.ca_cert. Does not check hostname. Requires ssl.ca_cert |
verify-full | Require TLS, verify the certificate chain, and verify hostname. Uses system roots when ssl.ca_cert is omitted |
Mutual TLS is not yet supported for MySQL/MariaDB.
Limitations
- Collections need a primary key for updates and deletes.
- Primary key values cannot currently be changed.
See Also
- Connectors - supported database connectors
- Introspection - how Monospace discovers your database schema
- Data Model - collections, fields, and relations