MySQL powers more databases than almost anything else on the internet — WordPress sites, e-commerce stores, SaaS backends, internal tools. If your data lives in MySQL, this guide shows you how to connect Claude to it so you can query it in plain English.

## What You'll Need

- A MySQL database (local, AWS RDS, PlanetScale, Railway, DigitalOcean, or any hosted MySQL)
- Claude Desktop or Claude.ai with connector support
- A [Synra](/content/site-root.html) account (free to start)

## Why Not Just Use a Local MCP Server?

You can run a local MySQL MCP server — there are open source options on GitHub. But local means:

- Separate setup on every machine you use
- Connection string and password stored in a plaintext `.env` file
- No audit trail of what queries were run
- No read-only enforcement at the gateway level

A managed MCP gateway like Synra handles all of that centrally. One URL, encrypted credentials, read-only by default, every query logged.

## Step-by-Step: Connect MySQL to Claude via Synra

### Step 1 — Get your MySQL credentials

You'll need:

- **Host** — e.g. `mysql.example.com` or `your-db.us-east-1.rds.amazonaws.com`
- **Port** — usually `3306`
- **Database name**
- **Username** and **password**

If you're on Railway or PlanetScale, copy the connection string from your project dashboard — Synra can parse it directly.

### Step 2 — Save credentials in Synra

1. Sign up at [mcpserver.design](/content/site-root.html)
2. Go to **Credentials → Add Database**
3. Select **MySQL** from the dropdown
4. Enter your connection details and save

Synra encrypts your credentials with AES-256 immediately on save. It also tests the connection so you know it works before you leave the page.

### Step 3 — Copy your MCP endpoint URL

Once connected, Synra generates a unique MCP endpoint URL for your database. Find it in the **Endpoints** tab of your dashboard and copy it.

### Step 4 — Add to Claude

Open Claude → **Settings → Connectors → Add custom connector** → paste your Synra URL.

That's it. Claude will detect the available tools and show a database icon in the toolbar confirming the connection is live.

## What Can Claude Do With Your MySQL Database?

Once connected, Claude can:

- List all tables and their schemas
- Run SELECT queries based on your plain English questions
- Join tables and aggregate data
- Describe column types and relationships
- Help you understand your own data structure

All queries are **read-only**. Synra blocks INSERT, UPDATE, DELETE, DROP, ALTER, and TRUNCATE at the gateway level — there's no way for Claude to modify your data.

## Example Queries to Try

Once connected, ask Claude things like:

- _"How many new users signed up this week?"_
- _"What are my top 10 products by revenue this month?"_
- _"Show me all orders with a status of 'pending' older than 7 days."_
- _"What tables are in my database and how are they related?"_

Claude will write the SQL, run it, and return the results in a readable format — no SQL knowledge required on your end.

## Troubleshooting Common Issues

**Connection refused** — Check that your MySQL host allows connections from external IPs. For RDS, check your security group inbound rules. For local databases, you'll need to expose them via a tunnel.

**Access denied** — Make sure the username has SELECT privileges on the database. You don't need (and shouldn't give) write access.

**SSL errors** — Synra supports SSL connections. If your MySQL requires SSL, enable it in the connection settings.
