Skip to main content

MySQL - Execute Queries

Overview​

Execute any SQL query against a MySQL database, without returning any of the resulting data. This Blueprint should primarily be used for queries that perform functionality other than SELECT, like multi-step SQL jobs, or DML statements.

Variables​

NameReferenceTypeRequiredDefaultOptionsDescription
HostMYSQL_HOSTAlphanumericβœ…--The domain or the IP address of the database you want to connect to.
PortMYSQL_PORTIntegerβœ…"3306"-Number for the database port to connect to. Defaults to 3306.
UsernameMYSQL_USERNAMEAlphanumericβœ…--Name of the user to connect to the database with.
PasswordMYSQL_PASSWORDPasswordβž–--Password associated to the provided username.
DatabaseMYSQL_DATABASEAlphanumericβœ…--Name of the database in MySQL to connect to.
Extra URL ParametersMYSQL_URL_PARAMETERSAlphanumericβž–--Extra parameters that will be placed at the end of the connection string, after the "?". Must be separated by "&".
QueryMYSQL_QUERYAlphanumericβœ…--Any SQL query that runs a job against the database (CREATE, DROP, INSERT, etc.). Formatting is ignored.

YAML​

Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.

source:
blueprint: MySQL - Execute Queries
inputs:
MYSQL_HOST: null ## REQUIRED
MYSQL_PORT: '3306' ## REQUIRED
MYSQL_USERNAME: null ## REQUIRED
MYSQL_PASSWORD: null
MYSQL_DATABASE: null ## REQUIRED
MYSQL_URL_PARAMETERS: null
MYSQL_QUERY: null ## REQUIRED
type: BLUEPRINT
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- '0'