New260+ blocks and 240+ tools are now fully documented
Tool

MySQL

Execute SQL queries on MySQL databases

Execute SQL queries against MySQL databases. Supports SELECT, INSERT, UPDATE, DELETE operations with connection pooling and parameterized queries.

Overview

PropertyValue
Typemysql
CategoryTool — Database
AuthConnection Credentials

Operations

OperationDescription
Execute QueryRun a raw SQL query
InsertInsert rows into a table
UpdateUpdate rows in a table
DeleteDelete rows from a table

Configuration

SettingTypeDescription
HostShort inputServer hostname
PortShort inputPort (default: 3306)
DatabaseShort inputDatabase name
UsernameShort inputMySQL username
PasswordPasswordMySQL password
SSLToggleUse SSL/TLS connection
ActionDropdownOperation type: Execute Query, Insert, Update, Delete
QueryCode editorSQL query (Execute Query action)
TableShort inputTarget table (Insert, Update, Delete actions)
DataCode/JSON editorRow data as JSON (Insert, Update actions)
ConditionsCode/JSON editorWHERE conditions as JSON (Update, Delete actions)

Outputs

FieldTypeDescription
datajsonQuery result rows or operation confirmation
affectedRowsnumberNumber of rows affected
metadatajsonColumn metadata from the query
errorstringError message if the query failed
errorDetailsjsonDetailed error information

Example: Customer Analytics Workflow

Workflow:

[Starter] → [Agent] → [Response]

        [MySQL] (connected as tool)

Agent receives natural-language questions, translates them to SQL, queries the MySQL database, and returns formatted results.

Tips

  • Use parameterized queries — The Insert, Update, and Delete actions use ? placeholders automatically for SQL injection prevention
  • Enable SSL for production and remote connections
  • Agent as tool — Provide table schemas in the system prompt so the AI can write accurate MySQL queries
  • Backtick quoting — Table and column names are automatically wrapped in backticks for MySQL compatibility
  • Connection pooling — Connections are pooled and reused across executions for better performance