MySQL Query¶
Executes a MySQL SELECT query using configured database credentials and returns the results. The node sends the provided SQL to the MySQL service endpoint and formats the response into a readable text summary and a JSON payload.

Usage¶
Use this node when you need to read data from a MySQL database as part of a workflow. Provide the credentials path, adjust the timeout if needed, and enter a valid MySQL SELECT statement. The resulting text and JSON can feed into downstream data processing, filtering, or visualization nodes. For write operations (INSERT/UPDATE/DELETE), use the dedicated execute node instead.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| credentials_path | True | Not specified | Path or reference to the MySQL credentials to authenticate the request. Must correspond to the MySQL credential template. | |
| timeout | True | Not specified | Maximum time to wait for the query to complete before timing out. | 30 |
| sql_text | True | STRING | A valid MySQL SELECT query to execute against the target database. | SELECT * FROM users LIMIT 10 |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| text | STRING | A human-readable summary of the MySQL query results. | MySQL Query Results: 10 rows returned |
| json | JSON | The raw result data from the query in JSON format. | {"rows": [{"id": 1, "name": "John"}], "row_count": 10} |
Important Notes¶
- SELECT only: This node is intended for read-only SELECT queries. For INSERT/UPDATE/DELETE operations, use SaltMySQLExecute.
- Credentials required: Ensure the provided credentials path references a valid MySQL credential configuration.
- Query validity: The SQL must be valid MySQL syntax and the referenced tables/columns must exist.
- Timeouts: Long-running queries may time out; adjust the timeout input or optimize the query.
- Result size: Very large result sets can impact performance and may exceed limits; consider adding LIMIT/filters.
Troubleshooting¶
- Authentication failed: Verify the credentials_path points to a valid MySQL credential and that the database is reachable.
- SQL syntax error: Check the sql_text for MySQL syntax issues and correct table/column names.
- Timeouts or network errors: Increase the timeout value, ensure network connectivity to the database, and confirm the database is responsive.
- Empty results: Confirm the WHERE clause and filters are correct, and that data exists in the target tables.