- Documentation
MySQL integration
Run parameterized queries and insert, update, upsert, and delete rows in a client's MySQL database from inside a workflow.
What it does
The MySQL integration lets your agency read and write a client's MySQL (or MariaDB) database directly from a workflow. Connect the database once with a connection string or discrete host, port, user, password, and database, and your workflows can run a parameterized query, insert a row, update or delete rows by an equality filter, and upsert a row on a duplicate key. Connection details are encrypted at rest, every value you pass is bound as a parameter rather than spliced into the SQL, and results are capped so a large read cannot overwhelm a run.
Connect a MySQL database
- Open your workspace in TaskJuice and add a MySQL connection on the node that uses it.
- Paste a connection string, for example
mysql://user:password@db.example.com:3306/appdb. - Or fill in the host, port (3306 by default), user, password, and database separately. Connections require TLS and verify the certificate chain by default.
- Save the connection. The password and connection string are stored encrypted and are never shown again or written to run output.
Provision a least-privilege database user scoped to the tables the workflow touches, and expose the database on a public host the workflow can reach over TLS. Private and internal addresses are blocked.
Actions
mysql/queryruns a SQL statement with?placeholders and a matchingparamsarray, returning the result rows and the row count.mysql/insertinserts a row from a column-to-value map and returns the affected row count.mysql/updateupdates the rows matching an equality filter, setting new column values, and returns the affected row count.mysql/upsertinserts a row or, on a duplicate unique or primary key, updates it (INSERT … ON DUPLICATE KEY UPDATE). MySQL chooses the conflicting index; the columns you name select which columns are refreshed.mysql/deletedeletes the rows matching an equality filter and returns the deleted row count.
Write a safe query
Always pass values through params, never by building the SQL string yourself:
sql: SELECT id, email FROM customers WHERE status = ? AND created_at > ?
params: ["active", "2026-01-01"]Table and column names in the insert, update, upsert, and delete actions are validated against a strict allowlist and quoted for you, so a name containing a backtick, semicolon, or whitespace is rejected before the statement runs.
Known limitations
- The query action returns at most 1,000 rows and around 5 MB per call; when a read is clipped the result sets
truncatedtotrue. Add aLIMITand aWHEREclause to keep reads bounded. - A statement that runs longer than 30 seconds is cancelled by the database. The server-side cap applies to
SELECTstatements; keep queries indexed and selective. - Connections are short-lived: each action opens and closes its own connection. Point the connection at a pooler if your database has a low connection limit.
- Database triggers (reacting to new or changed rows) are not part of this integration; it provides read and write actions only.