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#

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

MySQL Connections#

mySQL Connection#

InputKeyDefaultNotes

Database

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

Host

string
/ Required
host192.168.0.1Provide a string value for the address your MySQL server is hosted on.

Password

string
password

Port

string
/ Required
port3306Provide a string value of the port your database server is exposing.

Username

string
username

Actions#

Query#

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

InputKeyDefaultNotesExample

Connection

connection
/ Required
mySQLConnection

Parameters

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

Query

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