MySQL
Interact with a MySQL database from your workflow. Four node types are available for different operations. All require a MySQL connection.
MySQL Query
Execute a SELECT query on a MySQL database.
Configuration
| Field | Description | Notes |
|---|---|---|
| MySQL Connection | The MySQL connection to use | Required. Select from your configured MySQL connections. |
| Operation | Choose how many rows to return | Get Many (default) returns multiple rows. Get One returns only the first matching row. |
| Table | The table to query | Required. Select from tables available in the connected database. |
| Columns | Which columns to include in the results | Leave empty to return all columns. |
| Where | Filter conditions to narrow down results | See Where Conditions below. |
Get Many Options
These fields appear only when Operation is set to Get Many:
| Field | Description | Notes |
|---|---|---|
| Order By | Column to sort results by | Optional. |
| Direction | Sort direction | Ascending (default) or Descending. |
| Limit | Maximum number of rows to return | Optional. Must be at least 1. |
| Offset | Number of rows to skip | Optional. Useful for pagination. |
Additional Options
| Field | Description | Notes |
|---|---|---|
| Output Decimals as Numbers | Convert string-encoded decimal values to numbers | Disabled by default. Enable when downstream nodes need numeric values. |
Output
Get Many returns a list of row objects. Get One returns a single row object, or an empty object if no match is found.
MySQL Insert
Insert data into a MySQL database table.
Configuration
| Field | Description | Notes |
|---|---|---|
| MySQL Connection | The MySQL connection to use | Required. |
| Table | The table to insert into | Required. |
| Column Mapping | Map input data to table columns | Each entry maps a table column to a value from upstream data. |
| On Conflict | What to do when a duplicate key is detected | Raise Error (default), Ignore (Skip), or Update Existing. |
| Conflict Columns | Columns that determine uniqueness | Appears when On Conflict is Ignore or Update Existing. |
Output
| Field | Description |
|---|---|
success | true if the insert succeeded |
table | The name of the table |
inserted_data | The inserted row data |
insert_id | The auto-generated ID (if applicable) |
MySQL Update
Update data in a MySQL database table.
Configuration
| Field | Description | Notes |
|---|---|---|
| MySQL Connection | The MySQL connection to use | Required. |
| Table | The table to update | Required. |
| Update Fields Mapping | Map new values to table columns | Each entry maps a column to the new value. |
| WHERE Conditions | Filter which rows to update | See Where Conditions below. |
| Allow NULL Values | Whether to include null or empty values | Disabled by default. When disabled, null/empty mapped values are skipped. |
| Require WHERE Conditions | Whether WHERE conditions are mandatory | Enabled by default. |
Output
| Field | Description |
|---|---|
success | true if the update succeeded |
table | The name of the table |
affected_rows | Number of rows updated |
updated_data | The values that were set |
MySQL Delete
Delete data from a MySQL database table.
Configuration
| Field | Description | Notes |
|---|---|---|
| MySQL Connection | The MySQL connection to use | Required. |
| Table | The table to delete from | Required. |
| WHERE Conditions | Filter which rows to delete | See Where Conditions below. |
| Require WHERE Conditions | Whether WHERE conditions are mandatory | Enabled by default. |
Output
| Field | Description |
|---|---|
success | true if the delete succeeded |
table | The name of the table |
affected_rows | Number of rows deleted |
Where Conditions
All MySQL nodes use the same visual condition builder. Each condition has three parts:
- Column -- The column to filter on.
- Operation -- The comparison operator: equals, not equals, greater than, less than, greater than or equals, less than or equals, contains, starts with, ends with, in, not in, is null, is not null, is empty, is not empty.
- Value -- The value to compare against. Supports expressions that reference upstream node data.
Multiple conditions can be combined with AND or OR logic.
WARNING
Disabling Require WHERE Conditions on Update or Delete nodes allows the operation to affect every row in the table. Use with caution.
TIP
To sync data from an API to MySQL, connect an HTTP Request node to a MySQL Insert node. Use Column Mapping to map API response fields to your table columns, and set On Conflict to Update Existing for an upsert pattern.