Skip to main content
MySQL logo

Overview

Add MySQL to any ModuleX agent or workflow. MySQL database integration via the aiomysql driver. Provides raw SQL execution + CRUD + stored procedures + introspection.
Categories: Databases · Database · Data Management · Storage · Auth: MySQL Database Credentials · Actions: 9

Authentication

MySQL Database Credentials

Authenticate using MySQL connection credentials (host/port/user/password/database).

Required Credentials

FieldDescriptionRequiredFormat
HostMySQL server hostname or IPYeslocalhost or mysql.example.com
PortMySQL server port (defaults to 3306 if omitted)No3306
UsernameMySQL username for authenticationYes-
PasswordMySQL password for authenticationYes-
DatabaseThe database name to connect toYes-
SSL ModeSSL mode: ‘disabled’, ‘verify’ (default), or ‘skip_verification’No`verifyskip_verificationdisabled`

Available Actions

Parameters

sql
string
required
The SQL to execute
values
array
Values for ‘%s’ placeholders

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "row_count": {
      "default": 0,
      "title": "Row Count",
      "type": "integer"
    },
    "data": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Data",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "ExecuteRawQueryOutput",
  "type": "object"
}

Parameters

table
string
required
The table name
data
object
required
Column-value pairs to insert

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "table": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Table"
    },
    "affected_rows": {
      "default": 0,
      "title": "Affected Rows",
      "type": "integer"
    },
    "last_insert_id": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Last Insert Id"
    },
    "columns": {
      "items": {
        "type": "string"
      },
      "title": "Columns",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "CreateRowOutput",
  "type": "object"
}

Parameters

table
string
required
The table name
condition
string
required
WHERE condition with ’?’ placeholders
values
array
required
Values matching the ’?’ placeholders

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "table": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Table"
    },
    "affected_rows": {
      "default": 0,
      "title": "Affected Rows",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "DeleteRowOutput",
  "type": "object"
}

Parameters

table
string
required
The table name
data
object
required
Column-value pairs to update
condition
string
required
WHERE condition with ’?’ placeholders
condition_values
array
required
Values matching the ’?’ placeholders

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "table": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Table"
    },
    "affected_rows": {
      "default": 0,
      "title": "Affected Rows",
      "type": "integer"
    },
    "updated_columns": {
      "items": {
        "type": "string"
      },
      "title": "Updated Columns",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "UpdateRowOutput",
  "type": "object"
}

Parameters

table
string
required
The table name
column
string
required
Column to filter by
operator
string
=, >, >=, <, !=, <=, LIKE (Default: =)
value
string
Value to compare against

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "table": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Table"
    },
    "row_count": {
      "default": 0,
      "title": "Row Count",
      "type": "integer"
    },
    "data": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Data",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "FindRowOutput",
  "type": "object"
}

Parameters

table
string
required
The table name
condition
string
required
WHERE condition with ’?’ placeholders
values
array
required
Values matching the ’?’ placeholders

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "table": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Table"
    },
    "row_count": {
      "default": 0,
      "title": "Row Count",
      "type": "integer"
    },
    "data": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Data",
      "type": "array"
    }
  },
  "required": [
    "success"
  ],
  "title": "ExecuteQueryWithConditionOutput",
  "type": "object"
}

Parameters

stored_procedure
string
required
Procedure name (may be qualified ‘db.proc’)
values
array
Procedure parameters

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "procedure": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Procedure"
    },
    "row_count": {
      "default": 0,
      "title": "Row Count",
      "type": "integer"
    },
    "data": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "type": "array"
        },
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Data"
    }
  },
  "required": [
    "success"
  ],
  "title": "ExecuteStoredProcedureOutput",
  "type": "object"
}

Response

{
  "$defs": {
    "TableEntry": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Type"
        }
      },
      "title": "TableEntry",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "database": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Database"
    },
    "tables": {
      "items": {
        "$ref": "#/$defs/TableEntry"
      },
      "title": "Tables",
      "type": "array"
    },
    "count": {
      "default": 0,
      "title": "Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListTablesOutput",
  "type": "object"
}

Parameters

table
string
required
The table name

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "table": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Table"
    },
    "columns": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "title": "Columns",
      "type": "array"
    },
    "column_count": {
      "default": 0,
      "title": "Column Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "DescribeTableOutput",
  "type": "object"
}

Limits & Quotas

  • 60s connection timeout.
  • Connections are not pooled — opened per call, closed via the context manager.
  • find_row operator allowlist: =, >, >=, <, !=, <=, LIKE.
  • aiomysql is imported lazily so the manifest can be inspected without the driver installed.

PostgreSQL

Snowflake

Supabase