MySQL Query¶
Executes a MySQL SELECT query against a configured MySQL database and returns formatted results. It loads credentials from a provided path, sends the query to the MySQL service, and returns both a human-readable summary and a JSON payload. Designed for read-only queries; use the Execute node for INSERT/UPDATE/DELETE.

Usage¶
Use this node when you need to retrieve data from a MySQL database within a workflow. Provide a valid credentials file/path and a SELECT statement. Typical usage is to preview data, feed results into downstream processing, or export results in multiple formats via companion nodes.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| credentials_path | True | STRING | Path or reference to the stored MySQL credentials configuration that matches the 'mysql' credential template. | /path/to/credentials/mysql.json |
| timeout | False | INT | Maximum time in seconds to wait for the query to complete before failing. | 60 |
| sql_text | True | STRING | A MySQL SELECT statement to execute. Multiline supported. Use only read-only queries here. | SELECT id, name, email FROM users ORDER BY created_at DESC LIMIT 10; |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| text | STRING | Human-readable summary of the query results (e.g., row count and formatted rows). | MySQL Query Results (10 rows): ... |
| json | STRING | JSON string of the raw query result payload suitable for parsing downstream. | {"data": [{"id":1,"name":"Alice"}], "row_count": 1} |
| html | STRING | HTML table representation of the results (may be empty if not generated). | |
| xlsx | BYTES | Binary data for an Excel file containing the results (may be empty if not generated). | |
| BYTES | Binary data for a PDF rendering of the results (may be empty if not generated). |
Important Notes¶
- Only SELECT/read-only queries should be executed with this node. For INSERT/UPDATE/DELETE, use the 'MySQL Execute' node.
- Credentials must conform to the 'mysql' credential template. Ensure host, port, database, username, and password are valid.
- Queries are subject to timeouts; large or complex queries may need higher timeout settings or additional filtering/limits.
- Returned formats beyond text/JSON may be empty unless a flow or companion node specifically requests/produces them.
- Avoid constructing SQL from untrusted input to prevent SQL injection risks.
Troubleshooting¶
- Connection/authentication failed: Verify credentials_path points to a valid MySQL configuration with correct host, port, database, username, and password.
- Query timed out: Increase the timeout input or simplify/add LIMIT to your query.
- SQL syntax error: Validate your SELECT statement syntax and table/column names in the target database.
- Empty results: Confirm the query conditions match existing data; test with a simpler query or remove overly restrictive filters.
- Unexpected output format is empty: This node primarily guarantees text and JSON. If you need HTML/XLSX/PDF, ensure downstream steps or format-specific nodes generate those formats.