MySQL
连接到 MySQL 数据库
配置
查询(SELECT)
操作
查询(SELECT)
主机*
localhost 或 your.database.host
端口*
3306
数据库名称*
your_database
用户名*
root
密码*
••••••••
SSL 模式
首选
SQL 查询*
sql
SELECT * FROM users WHERE active = true
查询(SELECT)(
mysql_query)在 MySQL 数据库上执行 SELECT 查询
输入
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
host | string | 是 | MySQL 服务器主机名或 IP 地址 |
port | number | 是 | MySQL 服务器端口(默认:3306) |
database | string | 是 | 要连接的数据库名称 |
username | string | 是 | 数据库用户名 |
password | string | 是 | 数据库密码 |
ssl | string | 否 | SSL 连接模式(disabled、required、preferred) |
query | string | 是 | 要执行的 SQL SELECT 查询 |
输出
| 参数 | 类型 | 描述 |
|---|---|---|
message | string | 操作状态消息 |
rows | array | 查询返回的行数组 |
rowCount | number | 返回的行数 |
插入数据
操作
插入数据
主机*
localhost 或 your.database.host
端口*
3306
数据库名称*
你的数据库
用户名*
root
密码*
••••••••
SSL 模式
首选
表名*
users
数据(JSON)*
json
{
"name": "John Doe",
"email": "john@example.com",
"active": true
}
插入数据 (
mysql_insert)向 MySQL 数据库插入新记录
输入
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
host | string | 是 | MySQL 服务器主机名或 IP 地址 |
port | number | 是 | MySQL 服务器端口 (默认: 3306) |
database | string | 是 | 要连接的数据库名称 |
username | string | 是 | 数据库用户名 |
password | string | 是 | 数据库密码 |
ssl | string | 否 | SSL 连接模式 (disabled, required, preferred) |
table | string | 是 | 要插入的表名 |
data | object | 是 | 要插入的数据,以键值对形式提供 |
输出
| 参数 | 类型 | 描述 |
|---|---|---|
message | string | 操作状态消息 |
rows | array | 插入的行数组 |
rowCount | number | 插入的行数 |
更新数据
操作
更新数据
主机*
localhost 或 your.database.host
端口*
3306
数据库名称*
your_database
用户名*
root
密码*
••••••••
SSL 模式
首选
表名*
users
更新数据 (JSON)*
json
{
"name": "Jane Doe",
"email": "jane@example.com"
}
WHERE 条件*
id = 1
更新数据 (
mysql_update)更新 MySQL 数据库中的现有记录
输入
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
host | string | 是 | MySQL 服务器主机名或 IP 地址 |
port | number | 是 | MySQL 服务器端口 (默认:3306) |
database | string | 是 | 要连接的数据库名称 |
username | string | 是 | 数据库用户名 |
password | string | 是 | 数据库密码 |
ssl | string | 否 | SSL 连接模式 (disabled, required, preferred) |
table | string | 是 | 要更新的表名 |
data | object | 是 | 要更新的数据,以键值对形式提供 |
where | string | 是 | WHERE 子句条件 (不包含 WHERE 关键字) |
输出
| 参数 | 类型 | 说明 |
|---|---|---|
message | string | 操作状态消息 |
rows | array | 更新后的行数组 |
rowCount | number | 更新的行数 |
删除数据
操作
删除数据
主机*
localhost 或 your.database.host
端口*
3306
数据库名称*
your_database
用户名*
root
密码*
••••••••
SSL 模式
首选
表名*
users
WHERE 条件*
id = 1
删除数据 (
mysql_delete)从 MySQL 数据库删除记录
输入
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
host | string | 是 | MySQL 服务器主机名或 IP 地址 |
port | number | 是 | MySQL 服务器端口 (默认:3306) |
database | string | 是 | 要连接的数据库名称 |
username | string | 是 | 数据库用户名 |
password | string | 是 | 数据库密码 |
ssl | string | 否 | SSL 连接模式 (disabled, required, preferred) |
table | string | 是 | 要删除数据的表名 |
where | string | 是 | WHERE 子句条件 (不带 WHERE 关键字) |
输出
| 参数 | 类型 | 描述 |
|---|---|---|
message | string | 操作状态消息 |
rows | array | 已删除行的数组 |
rowCount | number | 已删除的行数 |
执行原始 SQL
操作
执行原始 SQL
主机*
localhost or your.database.host
端口*
3306
数据库名称*
your_database
用户名*
root
密码*
••••••••
SSL 模式
首选
SQL 查询*
sql
SELECT * FROM table_name
执行原始 SQL (
mysql_execute)在 MySQL 数据库上执行原始 SQL 查询
输入
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
host | string | 是 | MySQL 服务器主机名或 IP 地址 |
port | number | 是 | MySQL 服务器端口 (默认: 3306) |
database | string | 是 | 要连接的数据库名称 |
username | string | 是 | 数据库用户名 |
password | string | 是 | 数据库密码 |
ssl | string | 否 | SSL 连接模式 (禁用、必需、首选) |
query | string | 是 | 要执行的原始 SQL 查询 |
输出
| 参数 | 类型 | 描述 |
|---|---|---|
message | string | 操作状态消息 |
rows | array | 查询返回的行数组 |
rowCount | number | 受影响的行数 |
使用说明
将 MySQL 集成到工作流中。可以查询、插入、更新、删除和执行原始 SQL。
注意事项
- 类别:
tools - 类型:
mysql