Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.spojit.com/llms.txt

Use this file to discover all available pages before exploring further.

The MySQL connector lets your workflows interact with any MySQL-compatible database, including Amazon RDS, Google Cloud SQL, PlanetScale, and self-hosted instances.

Connection setup

1

Gather your MySQL credentials

You’ll need the following:
  • Host (e.g., localhost, db.example.com, or an RDS endpoint)
  • Port (default: 3306)
  • Username (e.g., root or a dedicated application user)
  • Password
  • Database (optional — the default database to connect to)
2

Add the connection in Spojit

Go to Connections in Spojit, click Add Connection, select MySQL, and enter:
  • Host: Your MySQL server hostname or IP
  • Port: MySQL port number (default 3306)
  • Username: Database username
  • Password: Database password
  • Database (optional): Default database name
  • Use SSL (optional): Enable for cloud-hosted databases
Cloud databases: Most cloud providers require SSL connections. Enable the Use SSL toggle when connecting to AWS RDS, Google Cloud SQL, Azure Database for MySQL, or PlanetScale.

Common MySQL settings

ProviderHost examplePortNotes
AWS RDSmydb.abc123.us-east-1.rds.amazonaws.com3306Enable SSL, allow security group access
Google Cloud SQL10.0.0.3 (private IP) or via proxy3306Use Cloud SQL Auth Proxy for secure access
PlanetScaleaws.connect.psdb.cloud3306SSL required, use connection string from dashboard
Self-hostedlocalhost or server IP3306Ensure firewall allows connections

Tools

Execute any SQL statement including SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, and more. Supports parameterized queries with ? placeholders.
query
string
required
SQL query to execute.
params
unknown[]
Parameterized query values for ? placeholders.
Example request:
{
  "query": "SELECT id, name, email FROM users WHERE status = ? LIMIT 10",
  "params": ["active"]
}
Example response:
{
  "success": true,
  "data": {
    "rows": [
      { "id": 1, "name": "Alice", "email": "alice@example.com" },
      { "id": 2, "name": "Bob", "email": "bob@example.com" }
    ],
    "fields": [
      { "name": "id", "type": 3 },
      { "name": "name", "type": 253 },
      { "name": "email", "type": 253 }
    ]
  }
}
List all databases accessible with the current credentials.Example response:
{
  "success": true,
  "data": {
    "databases": ["information_schema", "myapp", "analytics"]
  }
}
database
string
Database name. Defaults to the connection’s database.
Example request:
{
  "database": "myapp"
}
Example response:
{
  "success": true,
  "data": {
    "tables": ["users", "orders", "products", "sessions"]
  }
}
Returns column definitions and the CREATE TABLE statement for a table.
table
string
required
Table name.
database
string
Database name. Defaults to the connection’s database.
Example request:
{
  "table": "users"
}
Example response:
{
  "success": true,
  "data": {
    "columns": [
      { "Field": "id", "Type": "int", "Null": "NO", "Key": "PRI", "Default": null, "Extra": "auto_increment" },
      { "Field": "name", "Type": "varchar(255)", "Null": "NO", "Key": "", "Default": null, "Extra": "" },
      { "Field": "email", "Type": "varchar(255)", "Null": "NO", "Key": "UNI", "Default": null, "Extra": "" }
    ],
    "createStatement": "CREATE TABLE `users` (\n  `id` int NOT NULL AUTO_INCREMENT,\n  `name` varchar(255) NOT NULL,\n  `email` varchar(255) NOT NULL,\n  PRIMARY KEY (`id`),\n  UNIQUE KEY `email` (`email`)\n) ENGINE=InnoDB"
  }
}
table
string
required
Table name.
rows
object[]
required
Array of row objects to insert.
database
string
Database name. Defaults to the connection’s database.
Example request:
{
  "table": "users",
  "rows": [
    { "name": "Alice", "email": "alice@example.com" },
    { "name": "Bob", "email": "bob@example.com" }
  ]
}
Example response:
{
  "success": true,
  "data": {
    "affectedRows": 2,
    "insertId": 42
  }
}
table
string
required
Table name.
set
object
required
Column values to update.
where
string
required
WHERE clause. Use ? placeholders for parameterized values.
params
unknown[]
Values for ? placeholders in the WHERE clause.
database
string
Database name. Defaults to the connection’s database.
Example request:
{
  "table": "users",
  "set": { "status": "active" },
  "where": "last_login > ?",
  "params": ["2024-01-01"]
}
Example response:
{
  "success": true,
  "data": {
    "affectedRows": 15
  }
}
table
string
required
Table name.
where
string
required
WHERE clause. Use ? placeholders for parameterized values.
params
unknown[]
Values for ? placeholders in the WHERE clause.
database
string
Database name. Defaults to the connection’s database.
Example request:
{
  "table": "sessions",
  "where": "expires_at < ?",
  "params": ["2024-01-01"]
}
Example response:
{
  "success": true,
  "data": {
    "affectedRows": 128
  }
}