MySQL - Connection
MySQL - Connection
Creates a connection to a MySQL database from a connection configured in the workspace. The ID of this action is used as a reference by every other MySQL action in the flow — such as MySQL: Query, MySQL: Begin transaction and MySQL: Close connection.
- Version 3.0
- Version 2.0
- Version 1.0
Options
Connection to use
Select the MySQL connection previously registered in the workspace's Connections tab.
Options
Connection string
Full connection string for the MySQL database, for example mysql://user:password@host:3306/database.
Options
Host
IP address or host name of the MySQL server, for example 192.168.0.1.
Port
Port number used to connect to the MySQL server, for example 3306.
User
User name for authenticating on the MySQL database.
Password
The user's password for authenticating on the MySQL database.
Database name
Name of the database to use in the connection.
Advanced options
Local address
Local network interface address for the TCP connection. Optional field.
Socket path
Path to the Unix socket for a local connection, replacing host and port. Optional field.
Timezone
Time zone of the MySQL server, for example +00:00 or local. Optional field.
Connection timeout
Maximum time, in milliseconds, to establish the connection. Optional field.
Multiple MySQL statements
Allows running several SQL statements separated by semicolons in a single query. Optional field.
SSL
SSL configuration to encrypt the connection to the server. Optional field.
Connection URL
Alternative connection string. When filled in, it replaces the individual fields above.
Time limits
Available in Versions 3.0 and 2.0. Optional fields that limit, in seconds, how long opening the connection and running its queries may take. When at least one of these fields is filled in, a query that reaches the limit is canceled on the database server and the action fails; the connection stays open and can still be used — for example, to roll back a transaction. When none of them is filled in, the connection keeps the previous behavior: a query that reaches the limit (120 seconds, or the one set on the query itself) makes the action fail, but it is not canceled and keeps running on the server.
Connection timeout
Maximum time, in seconds, the action waits for the MySQL server to accept the connection. The minimum value is 1. When empty, the limit is 10 seconds. Optional field.
Default query timeout
Maximum time, in seconds, of every query run on this connection, except queries that set their own limit in the Query timeout field of the MySQL: Query action. A value of 0 means no limit. When empty, the limit is 120 seconds. Optional field.
Returns
This action has no direct returns. Its ID is used as a reference by the other MySQL actions.
Rules and Conditions
- In Version 3.0, the Connection field is required and the connection must be configured beforehand in the workspace's Connections tab.
- In Version 2.0, the Connection string field is required.
- In Version 1.0, the Host, Port, User, Password and Database name fields are the main connection parameters.
- In Version 1.0, the Connection URL field, when filled in, replaces every individual field.
- In Versions 3.0 and 2.0, the fields of the Time limits group are optional and their values are in seconds.
- The Connection timeout field accepts values from
1. - In the Default query timeout field,
0means no limit. - Users with
caching_sha2_passwordauthentication (the default since MySQL 8.0) are supported in every version.