Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MySQL

proto.mysql · version 2.6 · Action

Query, insert, update and delete rows in a MySQL or MariaDB database.

Ports

PortKindLabelRequiredMax connections
input 0main
output 0main

Credentials

SlotAccepted kindsRequired
mySqlproto.mysqlyes

Parameters

NameTypeDefaultRequiredShown whenDescription
operationoptions"insert"One of executeQuery, insert, update, upsert, select, deleteTable.
tableresource_locatoryesoperation = insert, update, upsert, select, deleteTableValues from lookup mysql.tables.
querycodeyesoperation = executeQuerySQL to run. Use $1, $2, … for values listed under Query Parameters.
columnsfixed_collectionoperation = insert, update, upsertHow item fields map to table columns: map automatically by name, or set each column. Values from lookup mysql.columns.
columns.mappingModeoptions"defineBelow"Mapping. One of autoMapInputData, defineBelow.
columns.valuejsonValues.
columns.matchingColumnsmulti_optionsColumns to Match On. Values from lookup mysql.columns.
returnAllbooleanfalseoperation = selectReturn All Rows.
limitnumber50operation = select
deleteCommandoptions"truncate"operation = deleteTableCommand. One of truncate, delete, drop.
wherefixed_collectionoperation = select, deleteTableConditions.
where.columnoptionsValues from lookup mysql.columns.
where.conditionoptionsOperator. One of equal, !=, LIKE, >, <, >=, <=, IS NULL, IS NOT NULL.
where.valuestring
combineConditionsoptions"AND"operation = select, deleteTableCombine Conditions. One of AND, OR.
sortfixed_collectionoperation = select
sort.columnoptionsValues from lookup mysql.columns.
sort.directionoptionsOne of ASC, DESC.
optionscollection
options.queryBatchingoptions"single"Query Batching. One of single, independently, transaction.
options.queryReplacementstringQuery Parameters. Comma-separated values, or an expression returning an array, used for $1, $2, …
options.outputColumnsmulti_optionsOutput Columns. Values from lookup mysql.columns.
options.connectionTimeoutnumber30Connection Timeout (Seconds).
options.largeNumbersOutputoptions"text"Large Numbers. One of text, numbers.
options.replaceEmptyStringsbooleanfalseWrite Empty Strings as NULL.
options.skipOnConflictbooleanfalseSkip Rows That Conflict.
options.treatQueryParametersInSingleQuotesAsTextbooleanfalseReplace Parameters Inside Quotes.

Import

Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.

Source typeVersion rangeStatusFixtures
n8n-nodes-base.mySql1unverified
n8n-nodes-base.mySql>=2 <3unverified