query_mysql
Execute read-only MySQL database queries to retrieve data using SELECT statements. Connect securely to MySQL databases with host, credentials, and query parameters to extract information without modifying data.
Instructions
执行MySQL数据库查询(只读模式)
Input Schema
Name | Required | Description | Default |
---|---|---|---|
db | Yes | 数据库名称 | |
host | Yes | 数据库主机地址 | |
port | Yes | 数据库端口 | |
pwd | Yes | 数据库密码 | |
querySql | Yes | 要执行的SQL查询语句(仅支持SELECT等只读操作) | |
user | Yes | 数据库用户名 |
Input Schema (JSON Schema)
{
"properties": {
"db": {
"description": "数据库名称",
"type": "string"
},
"host": {
"description": "数据库主机地址",
"type": "string"
},
"port": {
"description": "数据库端口",
"type": "integer"
},
"pwd": {
"description": "数据库密码",
"type": "string"
},
"querySql": {
"description": "要执行的SQL查询语句(仅支持SELECT等只读操作)",
"type": "string"
},
"user": {
"description": "数据库用户名",
"type": "string"
}
},
"required": [
"host",
"port",
"user",
"pwd",
"db",
"querySql"
],
"type": "object"
}