MySQL Test Connection¶
Validates that Salt can connect to a MySQL database using the provided credentials. It performs a lightweight connectivity check and returns a human-readable summary along with a JSON payload describing the result.

Usage¶
Use this node early in a workflow to verify that your MySQL credentials and network access are correct before running queries or other database operations. Typical usage is to provide a path to saved MySQL credentials and a reasonable timeout, then branch your workflow based on success or failure.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| credentials_path | True | STRING | Path to the stored MySQL credentials file that follows the MySQL credential template (host, port, database, username, password, and optional SSL settings). | /workspace/credentials/mysql.json |
| timeout | True | INT | Maximum time in seconds to wait for the connection test to complete before failing. | 30 |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| text | STRING | Human-readable summary of the connection test outcome. | MySQL Connection Test: Success |
| json | JSON | Raw JSON response containing connection test details (e.g., success flag, message, and any diagnostic info). | {"success": true, "message": "Connection established."} |
| html | STRING | HTML output (not used for this node; will be empty). | |
| xlsx | BYTES | XLSX output (not used for this node; will be empty). | |
| BYTES | PDF output (not used for this node; will be empty). |
Important Notes¶
- Credentials: Ensure your credentials file matches the MySQL template (including host, port, database, username, and password).
- Network Access: The environment running this node must be able to reach the MySQL host/port.
- No Data Changes: This node does not execute SQL; it only checks connectivity.
- Timeouts: Slow networks or strict firewalls may require increasing the timeout value.
Troubleshooting¶
- Authentication failed: Verify username/password and that the user has permission to access the specified database.
- Host unreachable or DNS error: Check the host/IP, port, VPC/firewall rules, and that the MySQL server is running.
- SSL/Certificate issues: If your server requires SSL, ensure SSL-related options are correctly set in your credentials.
- Operation timed out: Increase the timeout input and re-run; also verify network latency and server load.
- Access denied to database: Confirm the database name exists and the provided user has privileges on it.