Skip to content

MySQL Test Connection

Validates that Salt can connect to a MySQL database using the provided credentials. It sends a lightweight test request and returns a human-readable status message along with the raw JSON response. No schema or data operations are performed; this node is purely for connectivity verification.

Usage

Use this node early in a workflow to confirm that your MySQL credentials, host, port, and network access are correct before running queries or schema operations. It’s typically placed after configuring credentials and before any query/execute nodes.

Inputs

FieldRequiredTypeDescriptionExample
credentials_pathTrueSTRINGPath or reference to stored MySQL credentials matching the 'mysql' credential template. The node loads these to attempt a connection./credentials/mysql/.json
timeoutFalseINTMaximum time in seconds to wait for the connection test before timing out.30

Outputs

FieldTypeDescriptionExample
textSTRINGHuman-readable summary of the connection test result.MySQL Connection Test: Success
jsonSTRINGRaw JSON payload returned by the service, useful for programmatic inspection.{"status":"ok","details":{"host":"db.example.com","latency_ms":42}}
htmlSTRINGHTML output (not used for this test; typically empty).
xlsxBYTESExcel data (not used for this test; typically empty).
pdfBYTESPDF data (not used for this test; typically empty).

Important Notes

  • This node uses the 'mysql' credential template; ensure your saved credentials conform to it.
  • Only connectivity is tested; no tables, schemas, or data are accessed.
  • If the service is unreachable or credentials are invalid, the text output will summarize the failure and the json output will include error details.
  • Timeout applies to the connectivity check; very large timeouts can delay failure detection.

Troubleshooting

  • Authentication failed: Verify username, password, and that the credentials were saved under the 'mysql' template.
  • Host unreachable or port blocked: Confirm network access, correct host/port, and that the database allows inbound connections from the Salt environment.
  • SSL/TLS errors: Adjust SSL settings in your stored credentials (e.g., SSL mode) to match the server configuration.
  • Operation timed out: Increase the timeout input or check for network latency/firewalls.
  • Intermittent failures: Check database server load, connection limits, or transient network issues and retry.