DocumentationWorkflowsApps and services

MySQL node

Runs a prepared SQL query against your configured MySQL database. By default only SELECT is allowed; write and schema operations need explicit full access. Learn how to configure it, map inputs and outputs, run a test and resolve common errors.

8 min readUpdated

What this node does

Runs a prepared SQL query against your configured MySQL database. By default only SELECT is allowed; write and schema operations need explicit full access.

Use MySQL as a clearly defined step in an anymize workflow.

  • Processes one input.
  • Provides one output for following steps.
  • Runs as a regular step in the flow.

Set up the node

  1. 01Open a workflow and add MySQL from the node catalog.
  2. 02Set up your MySQL connection under Connectors. The node uses it by default, as shown in the "Connection source" field.
  3. 03Complete the required fields and map values from previous steps.
  4. 04Run the node with a small test record and inspect its output.
  5. 05Connect the successful output and activate the workflow after an end-to-end test.

Operations and modes

MySQL has one focused purpose. Its available settings appear when you select the node.

Settings

FieldMeaningArea
Connection sourceBy default, this uses the MySQL access you set up under Connectors. Alternatively, you can use an encrypted workflow secret.Standard
Connection secretWorkflow secret with mysql://… or JSON {host,port,database,user,password,ssl}. Only the secret name is stored in the workflow.Protected
SELECT only (read-only)On: only single SELECT statements in a READ-ONLY transaction. Turning it off allows writes only if the connector is configured with unrestricted access.Standard
SQLConfigure this value in the node panel.Standard
ParametersValues for the ? placeholders, in order.Standard
Run once per itemOff (default): the node runs once for the whole input. On: if it receives several items (e.g. from Split Out), it runs once PER item, and {{ $json }} is that one item each time. This is how you work through a file list entry by entry.Standard
If one item fails"Skip" writes an `error` field for the failed item and keeps processing the rest, instead of losing the whole run to a single unreadable file.Standard
Pause between items (milliseconds)Wait before every run except the first. 1000 = 1 second per item. Useful when the other side would otherwise throttle you. Maximum 300000 (5 minutes).Standard

Inputs and outputs

InputMeaningType
paramsPositional parameters for the ? placeholders.json
OutputMeaningType
rowsArray of rows from the query result.json
rowCountNumber of rows read or affected.number

This node can process lists item by item. Error handling and the delay between items are available in advanced settings.

Example and test run

User lookup: begin with a small, recognizable record. Inspect the output and only map fields that are present there.

Test-run example

{
  "user_id": "user-42"
}

Access and security

By default the node uses the MySQL connection you set up under Connectors. Existing workflows can use a Workflow Secret with the connection details instead. Give the database user only the rights the workflow needs.

"Allowed actions" in the settings of your MySQL connection under Connectors also applies to this node and is checked on every run, even when it uses a Workflow Secret. Every step of this node counts as a change here, even a query that only reads. With "Read only" or "Read and draft" it does not run; it needs "Allow changes".

Keys and credentials belong in Workflow Secrets or your connected accounts. Never paste them as plain text into workflow fields, test data or descriptions.

Troubleshooting

  • No output: inspect the latest run and confirm that the previous node returned the expected fields.
  • Empty variable: open the previous step output and use a field name from the real test data.
  • Connection rejected: reconnect the service and grant the permissions required by this step.
  • Action blocked: set "Allowed actions" of the connection under Connectors to "Allow changes".
  • List processed once: enable per-item execution in advanced settings.