YAML for MySQL

View as Markdown

MySQL target for executing queries on a MySQL database.

YAML parameters for MySQL

PARAMETERS
hostrequiredstring
The hostname or IP address of the MySQL server
targetrequiredstring
The human-readable ID of the target
namestring
The name of the target
portstring
The port of the MySQL server. Default: 3306
databasestring
The default database name
ssl_modestring enum
SSL connection mode. Default: REQUIRE (encrypted, server certificate not validated), applied on the tunneled hop too when a proxy is set. REQUIRE is advisory on Target Exec: the MariaDB client used there has no --ssl-mode, and encryption silently falls back to plaintext when the server offers no TLS - use VERIFY_FULL to make it mandatory. VERIFY_FULL with a proxy requires the server certificate to cover the tunnel endpoint (127.0.0.1) in its SAN, otherwise hostname validation fails.
Allowed enum:
DISABLE,
REQUIRE,
VERIFY_FULL
ca_certificatestring
PEM-encoded CA certificate (required when ssl_mode is VERIFY_FULL)
authMysqlAuthYaml
MySQL authentication credentials
proxystring
SSH proxy target for tunneling to private MySQL servers
permissionsPermissionsYaml
Access permissions for the target
disabledboolean
Indicates if this target is disabled (default: false)
tagsstring[]
The list of tags associated with the target
use_asUseAsYaml
Defines how the target can be used (as deployment target, proxy, or both)
notestring
Note for this resource
agent_notestring
YAML note for AI agents operating on this resource
typestring

Value: MYSQL

Last modified on Oct 6, 2026

YAML examples for MySQL

MySQL target with SSL verification

yaml
- target: mysql-prod type: MYSQL name: Production MySQL host: db.internal.example.com port: '3306' database: production ssl_mode: VERIFY_FULL ca_certificate: | -----BEGIN CERTIFICATE----- <paste the CA that signed the server certificate here> -----END CERTIFICATE----- auth: username: admin password: secured

With Proxy

yaml
- target: mysql-behind-bastion type: MYSQL name: MySQL in a private network host: db.internal.example.com port: '3306' database: production ssl_mode: REQUIRE proxy: ssh-bastion auth: username: admin password: secured

Minimal

yaml
- target: mysql type: MYSQL host: db.internal.example.com auth: username: admin password: secured