Connect to AI
Databases Basic Auth

MySQL REST API

Popular open-source relational database management system

MySQL is the world's most popular open-source relational database management system. Developers use it to store, organize, and retrieve structured data efficiently with ACID compliance, powerful query capabilities, and robust transaction support. MySQL powers millions of applications from small startups to enterprise-scale systems.

Base URL https://api.mysql.rest/v1

API Endpoints

MethodEndpointDescription
POST/databasesCreates a new MySQL database instance and returns the database_id for subsequent operations.
GET/databasesLists all MySQL database instances with their connection details and current status.
GET/databases/{database_id}Retrieves configuration, connection string, and status for the specified database_id.
DELETE/databases/{database_id}Permanently deletes the database instance identified by database_id and all associated data.
POST/databases/{database_id}/queryExecutes a SQL query on the specified database and returns result rows or affected count.
GET/databases/{database_id}/tablesLists all tables in the database with their names, row counts, and storage sizes.
POST/databases/{database_id}/tablesCreates a new table in the database using the provided schema definition and returns table_name.
GET/databases/{database_id}/tables/{table_name}Get schema and metadata for a specific table
POST/databases/{database_id}/backupCreates a full backup of the database and returns the backup_id for restoration purposes.
GET/databases/{database_id}/backupsLists all backups for the database with timestamps, sizes, and restoration availability.
POST/databases/{database_id}/restoreRestores the database from a specified backup_id, replacing current data with backup snapshot.
GET/databases/{database_id}/usersList database users and their privileges
POST/databases/{database_id}/usersCreate a new database user with privileges
GET/databases/{database_id}/metricsRetrieves performance metrics including query throughput, connection count, and storage usage statistics.
POST/databases/{database_id}/replicasCreates a read replica of the database in the specified region and returns the replica_id.

Code Examples

curl -X POST https://api.mysql.rest/v1/databases/db_123/query \
  -u 'username:password' \
  -H 'Content-Type: application/json' \
  -d '{
    "query": "SELECT * FROM users WHERE status = ? LIMIT ?",
    "params": ["active", 10]
  }'

Use MySQL from Claude / Cursor / ChatGPT

Get a hosted MCP endpoint for MySQL. Paste your MySQL API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls MySQL directly with your credentials — no local install, works on mobile.

mysql_query_executor Execute parameterized SQL queries safely with automatic connection management and result formatting
mysql_schema_analyzer Analyze database schema, generate ERD diagrams, and identify optimization opportunities
mysql_backup_manager Create, schedule, and restore database backups with automatic retention policies
mysql_performance_monitor Monitor query performance, identify slow queries, and suggest index improvements
mysql_migration_assistant Generate and execute database migrations, track schema versions, and rollback changes

Connect in 60 seconds

Paste your MySQL key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.

Connect MySQL to your AI →

Related APIs