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 status along with the raw JSON response.

Usage¶
Use this node right after configuring your MySQL credentials to confirm connectivity before running any queries or schema operations. It’s typically placed at the start of a workflow to fail fast if the database is unreachable or credentials are incorrect.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| credentials_path | True | STRING | Path or reference to the saved MySQL credentials that follow the MySQL credential template (e.g., host, port, database, username, password, and optional SSL details). | /workspace/credentials/mysql.json |
| timeout | True | INT | Maximum time in seconds to wait for the connection test before failing. | 30 |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| text | TEXT | Human-readable summary of the connection test (e.g., success or error message). | MySQL Connection Test: Success |
| json | JSON | Raw JSON payload with detailed result data from the connection test. | {"status":"ok","message":"Connection successful"} |
| html | HTML | HTML representation (not used by this node; returned empty). | |
| xlsx | BYTES | Binary Excel data (not used by this node; returned empty). | |
| BYTES | Binary PDF data (not used by this node; returned empty). |
Important Notes¶
- This node uses the MySQL credential template. Ensure your stored credentials include the correct host, port, database, username, and password, and any required SSL settings.
- The operation is read-only and does not modify any data; it only tests connectivity.
- Network access to the MySQL server must be permitted from the Salt runtime environment (firewalls, security groups, VPN, and allowlists must be correctly configured).
- If your MySQL server enforces SSL, ensure the SSL mode and related parameters in your credentials match the server configuration.
- The output includes both a human-readable summary and a JSON object to facilitate both visual checks and programmatic branching in workflows.
Troubleshooting¶
- Authentication failed: Verify username/password, database name, and that the user has permission to connect from the Salt runtime’s IP/host.
- Network timeout or unreachable host: Check host/port, firewall rules, VPC/VPN connectivity, and increase the timeout if needed.
- SSL/TLS errors: Align SSL mode and certificates with server settings (e.g., REQUIRED, VERIFY_CA, or VERIFY_IDENTITY).
- Access denied for user or database does not exist: Confirm the database exists and the user privileges are correctly granted for that database.
- Intermittent connection issues: Check MySQL server availability, connection limits, and any load balancers or proxies in the path.