MySQL Connection String¶
Builds a MySQL connection URI from individual parameters. It assembles host, port, database, username, and password, and optionally appends charset and SSL mode as query parameters. The result is a single connection string suitable for use in downstream database operations.

Usage¶
Use this node when you need a properly formatted MySQL connection string constructed from separate input fields. Typical workflow: provide your database server details and credentials, then pass the resulting URI to nodes or services that accept a MySQL connection string.
Inputs¶
| Field | Required | Type | Description | Example |
|---|---|---|---|---|
| host | True | STRING | Database hostname or IP address. | localhost |
| port | True | INT | Database port number. | 3306 |
| database | True | STRING | Name of the target database. | mydb |
| username | True | STRING | Database username. | dbuser |
| password | True | PASSWORD | Database password. | |
| charset | True | STRING | Character set for the connection. If left as the default, it will be omitted from the URI. | utf8mb4 |
| ssl_mode | True | DISABLED \| PREFERRED \| REQUIRED \| VERIFY_CA \| VERIFY_IDENTITY | SSL connection mode. If left as the default (PREFERRED), it will be omitted from the URI. | PREFERRED |
Outputs¶
| Field | Type | Description | Example |
|---|---|---|---|
| text | STRING | The constructed MySQL connection string in URI form. | mysql://dbuser: |
| json | STRING | JSON metadata or error details. Empty on success; contains {"error": "..."} on failure. | {"error": "Failed to construct connection string: ..."} |
| html | STRING | Unused for this node. Returns empty string. | |
| xlsx | BYTES | Unused for this node. Returns empty bytes. | |
| BYTES | Unused for this node. Returns empty bytes. |
Important Notes¶
- Charset and SSL mode are appended as query parameters only when different from their defaults (utf8mb4 for charset, PREFERRED for ssl_mode).
- Special characters in username, password, or database are not URL-encoded by this node; ensure values are URI-safe or pre-encode them.
- The output focuses on providing the connection URI in the first output; other outputs are empty unless an error occurs, in which case the second (json) output includes error details.
- This node does not load or reference external stored credentials; it builds the URI strictly from the provided inputs.
Troubleshooting¶
- Connection string contains unexpected characters: URL-encode username, password, or database if they include special characters (e.g., @, :, /, ?).
- Downstream connection fails with SSL errors: adjust the ssl_mode to match your server configuration (e.g., REQUIRED, VERIFY_CA, or VERIFY_IDENTITY).
- Authentication fails: verify username/password and ensure the user has access to the specified database and host.
- Port or host unreachable: confirm network connectivity, firewall rules, and correct host/port values.
- Received an error message in the json output: review the error text for clues (e.g., formatting or missing inputs), correct the inputs, and retry.