MySQL Component

Query and manage data in a MySQL Database
Component key: mysql#
DescriptionMySQL is a popular relational database system. This component allows you to query a MySQL database.
This component returns data as an object that can be used in subsequent steps.
Instead of generating dynamic queries and sanitizing SQL yourself, you can use generic queries with parameter placeholders using the ?
placeholder.
You can use the placeholder several times in your query, and provide a list of optional parameters to the action.
For example, you can enter a query that reads INSERT INTO users (name, email) VALUES (?, ?)
.
Then, configure the optional parameters input to look like the following, ["myUsername", "myEmail"]
or whatever values you like.
Values provided for name and email are sanitized automatically.
#
MySQL Connections#
MySQL ConnectionCreate a new MySQL connection and enter the host, port, and database for your MySQL server. The username and password are optional inputs that can be put directly into a MySQL connection.
Input | Default | Notes |
---|---|---|
Input Database string / Required | Default | Notes The name of your database. |
Input Host string / Required | Default my-server.example.com | Notes The publicly-accessible address of your MySQL server. |
Input Password string | Default | Notes |
Input Port string / Required | Default 3306 | Notes The port your database server is exposing. |
Input Username string | Default | Notes |
#
Actions#
QueryReturns the results of a MySQL database query | key: query
Input | Default | Notes |
---|---|---|
Input Connection connection / Required | Default | Notes |
Input Parameters data Value List | Default | Notes Optional parameters to insert into a query. |
Input Query string / Required | Default SELECT * FROM `table` WHERE `name` = ? AND `age` > ? | Notes A query to be executed by the MySQL server. Substitute parameters with '?' marks. |
#
Output Example Payload{ "data": [ { "id": 1, "mycolumn1": "foo", "mycolumn2": "bar" }, { "id": 2, "mycolumn1": "foo2", "mycolumn2": "bar2" } ]}