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.
https://api.mysql.rest/v1
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /databases | Creates a new MySQL database instance and returns the database_id for subsequent operations. |
| GET | /databases | Lists 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}/query | Executes a SQL query on the specified database and returns result rows or affected count. |
| GET | /databases/{database_id}/tables | Lists all tables in the database with their names, row counts, and storage sizes. |
| POST | /databases/{database_id}/tables | Creates 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}/backup | Creates a full backup of the database and returns the backup_id for restoration purposes. |
| GET | /databases/{database_id}/backups | Lists all backups for the database with timestamps, sizes, and restoration availability. |
| POST | /databases/{database_id}/restore | Restores the database from a specified backup_id, replacing current data with backup snapshot. |
| GET | /databases/{database_id}/users | List database users and their privileges |
| POST | /databases/{database_id}/users | Create a new database user with privileges |
| GET | /databases/{database_id}/metrics | Retrieves performance metrics including query throughput, connection count, and storage usage statistics. |
| POST | /databases/{database_id}/replicas | Creates a read replica of the database in the specified region and returns the replica_id. |
Sponsor this page
AvailableReach developers actively building with MySQL. See live pageview data and self-serve checkout — your slot goes live in minutes.
View inventory & pricing →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 →