Thanks to visit codestin.com
Credit goes to docs.sim.ai

MySQL

Usage Instructions

Integrate MySQL into the workflow. Can query, insert, update, delete, and execute raw SQL.

Actions

mysql_query

Execute SELECT query on MySQL database

Input

ParameterTypeRequiredDescription
hoststringYesMySQL server hostname or IP address
portnumberYesMySQL server port (default: 3306)
databasestringYesDatabase name to connect to (e.g., my_database)
usernamestringYesDatabase username
passwordstringYesDatabase password
sslstringNoSSL connection mode (disabled, required, preferred)
querystringYesSQL SELECT query to execute (e.g., SELECT * FROM users WHERE active = 1)

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of rows returned from the query
rowCountnumberNumber of rows returned

mysql_insert

Insert new record into MySQL database

Input

ParameterTypeRequiredDescription
hoststringYesMySQL server hostname or IP address
portnumberYesMySQL server port (default: 3306)
databasestringYesDatabase name to connect to (e.g., my_database)
usernamestringYesDatabase username
passwordstringYesDatabase password
sslstringNoSSL connection mode (disabled, required, preferred)
tablestringYesTable name to insert into (e.g., users, orders)
dataobjectYesData to insert as key-value pairs

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of inserted rows
rowCountnumberNumber of rows inserted

mysql_update

Update existing records in MySQL database

Input

ParameterTypeRequiredDescription
hoststringYesMySQL server hostname or IP address
portnumberYesMySQL server port (default: 3306)
databasestringYesDatabase name to connect to (e.g., my_database)
usernamestringYesDatabase username
passwordstringYesDatabase password
sslstringNoSSL connection mode (disabled, required, preferred)
tablestringYesTable name to update (e.g., users, orders)
dataobjectYesData to update as key-value pairs
wherestringYesWHERE clause condition (without WHERE keyword)

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of updated rows
rowCountnumberNumber of rows updated

mysql_delete

Delete records from MySQL database

Input

ParameterTypeRequiredDescription
hoststringYesMySQL server hostname or IP address
portnumberYesMySQL server port (default: 3306)
databasestringYesDatabase name to connect to (e.g., my_database)
usernamestringYesDatabase username
passwordstringYesDatabase password
sslstringNoSSL connection mode (disabled, required, preferred)
tablestringYesTable name to delete from (e.g., users, orders)
wherestringYesWHERE clause condition (without WHERE keyword)

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of deleted rows
rowCountnumberNumber of rows deleted

mysql_execute

Execute raw SQL query on MySQL database

Input

ParameterTypeRequiredDescription
hoststringYesMySQL server hostname or IP address
portnumberYesMySQL server port (default: 3306)
databasestringYesDatabase name to connect to (e.g., my_database)
usernamestringYesDatabase username
passwordstringYesDatabase password
sslstringNoSSL connection mode (disabled, required, preferred)
querystringYesRaw SQL query to execute (e.g., CREATE TABLE users (id INT PRIMARY KEY, name VARCHAR(255)))

Output

ParameterTypeDescription
messagestringOperation status message
rowsarrayArray of rows returned from the query
rowCountnumberNumber of rows affected

mysql_introspect

Introspect MySQL database schema to retrieve table structures, columns, and relationships

Input

ParameterTypeRequiredDescription
hoststringYesMySQL server hostname or IP address
portnumberYesMySQL server port (default: 3306)
databasestringYesDatabase name to connect to (e.g., my_database)
usernamestringYesDatabase username
passwordstringYesDatabase password
sslstringNoSSL connection mode (disabled, required, preferred)

Output

ParameterTypeDescription
messagestringOperation status message
tablesarrayArray of table schemas with columns, keys, and indexes
databasesarrayList of available databases on the server

On this page