Skip to content

MySQL Execute

Executes MySQL data-changing statements (INSERT, UPDATE, DELETE, DDL). It uses stored credentials to connect and returns a human-readable summary along with the raw JSON response.
Preview

Usage

Use this node to perform non-SELECT operations against a MySQL database. Typical workflows include inserting new records, updating existing rows, deleting data, or running schema changes. Place it after a credentials/secret selection step and before any nodes that depend on side effects (e.g., verification queries or downstream processing).

Inputs

FieldRequiredTypeDescriptionExample
credentials_pathTrueSTRINGPath or reference to stored MySQL credentials matching the 'mysql' template. Used by the node to authenticate with the database./secrets/mysql/prod
timeoutFalseINTMaximum time in seconds to wait for the execute request to complete before failing.30
sql_textTrueSTRINGSQL statement to execute. Intended for INSERT, UPDATE, DELETE, and DDL operations (non-SELECT).INSERT INTO users (name, email) VALUES ('John Doe', 'john@example.com')

Outputs

FieldTypeDescriptionExample
textSTRINGFormatted summary of the execution result (e.g., affected rows, success message).MySQL Execute Results: 1 row affected
jsonJSONRaw JSON response from the service, which may include affected row counts, status, and any returned metadata.{"status":"success","affected_rows":1}
htmlHTMLHTML output placeholder (empty for this node).
xlsxXLSXXLSX output placeholder (empty for this node).
pdfPDFPDF output placeholder (empty for this node).

Important Notes

  • Non-SELECT only: Designed for INSERT/UPDATE/DELETE and DDL. Use a query node for SELECT statements.
  • Credentials required: Ensure the provided credentials path refers to a valid MySQL credential set.
  • Execution effects: Operations are executed directly on the target database. Validate idempotency when re-running flows.
  • Timeouts: Long-running statements may need increased timeout values.
  • SQL injection: Avoid interpolating untrusted input directly into SQL strings.

Troubleshooting

  • Syntax error: Verify the SQL statement syntax is valid for MySQL and that referenced tables/columns exist.
  • Permission denied: Ensure the database user has sufficient privileges for the operation.
  • Connection timeout: Increase the timeout input or check network connectivity and database availability.
  • No rows affected: Confirm WHERE clauses and target data match; verify the statement against the current dataset.
  • Invalid credentials path: Provide a correct credentials_path that matches a valid 'mysql' credential template.