Skip to main content

MySQL Component

Query and manage data in a MySQL Database

Component key: mysql

Description#

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

Authorization Notes#

The MySQL username and password can be put directly into a basic auth credential, alongside the database host, port, and database name in their respective config variables.

Actions#

Query#

Returns the results of a MySQL database query | key: query

InputKeyDefaultNotesExample

Database

string
/ Required
databaseProvide a string value for the name of the database.exampleDB

Host

string
/ Required
hostProvide a string value for the address your MySQL server is hosted on.192.168.0.1

Parameters

data
paramsOptional parameters to insert into a query.["Example value to be inserted"]

Port

string
/ Required
port3306Provide a string value for the port that your MySQL server is exposing.3306

Query

string
/ Required
queryFieldSELECT * FROM `table` WHERE `name` = ? AND `age` > ?Provide a string containing a query to be executed by the MySQL server

Authorization#

Authorization is not required for this action.
Auth TypeKeyDescriptionFields
Basic AuthbasicBasic authorization using a username/password combination

Username |  username

Password |  password