Skip to content

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.
Preview

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

FieldRequiredTypeDescriptionExample
credentials_pathTrueSTRINGPath 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
timeoutTrueINTMaximum time in seconds to wait for the connection test to complete before failing.30

Outputs

FieldTypeDescriptionExample
textSTRINGHuman-readable summary of the connection test outcome.MySQL Connection Test: Success
jsonJSONRaw JSON response containing connection test details (e.g., success flag, message, and any diagnostic info).{"success": true, "message": "Connection established."}
htmlSTRINGHTML output (not used for this node; will be empty).
xlsxBYTESXLSX output (not used for this node; will be empty).
pdfBYTESPDF 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.