Blog
guide

How to Connect MySQL to ChatGPT Using Sequel

Musthaq Ahamad
Musthaq Ahamad
How to Connect MySQL to ChatGPT Using Sequel

MySQL is one of the most popular databases for web applications, and ChatGPT is one of the most widely used AI tools. Connecting them through Sequel's MCP server gives ChatGPT live access to your MySQL data. You just type your question and get an answer.

What You'll Accomplish

Once connected, you can ask ChatGPT:

  • "How many customers do we have in the United States?"
  • "What were our top-selling products last month?"
  • "Are there any pending orders that haven't shipped yet?"

Prerequisites

  • A Sequel account: Sign up free at sequel.sh
  • A running MySQL database: local or cloud-hosted
  • A ChatGPT Plus, Team, or Enterprise account: required for custom MCP apps

Step 1: Connect Your MySQL Database to Sequel

Sign in to sequel.sh and click Data Sources in the left sidebar.

Sequel Data Sources page

Click New Connection. On the "Choose a connector" page, select MySQL.

Choose a connector

Fill in two fields:

  • Connection Name: a memorable label, e.g. MySQL Production
  • Connection String: your full MySQL connection string:
mysql://username:password@host:3306/database_name

MySQL connection form

Click Connect to verify and save.

Recommended: Create a read-only user before connecting:

CREATE USER 'sequel_reader'@'%' IDENTIFIED BY 'secure_password';
GRANT SELECT ON your_database.* TO 'sequel_reader'@'%';
FLUSH PRIVILEGES;

Step 2: Add Sequel to ChatGPT

First, enable Developer Mode. Open ChatGPT and go to Settings -> Apps. Click Advanced Settings and toggle Developer Mode on.

ChatGPT Developer Mode settings

Developer Mode lets you add unverified MCP apps. Note that it disables ChatGPT's Memory feature while active.

Now go back to Settings -> Apps and click Create App. Fill in the details:

  • Name: Sequel
  • Description: Sequel AI Data Analytics (optional)
  • MCP Server URL: https://api.sequel.sh/mcp
  • Authentication: OAuth

Check "I understand and want to continue", then click Create.

ChatGPT New App form with Sequel MCP details

Sequel's authorization page will open in your browser. Review the permissions and click Allow access.

Sequel OAuth authorization screen

Once authorized, Sequel will appear in your Apps list and you're ready to query.

Step 3: Query Your MySQL Database

Using my MySQL database, how many users signed up this week?
What's the average order value for customers in California?
Show me all products that have been out of stock for more than 7 days.

What You Can Do Now

  • Sales and marketing analysis: ask "Which email campaign drove the most sign-ups this month?"
  • Support and operations: answer customer questions by querying order or account status directly
  • Product insights: ask "What features are most-used by paying customers?"
  • Data validation: ask "Are there any records missing a required field?" before exports or migrations

Try Sequel

Meet your always-on data analyst.

An AI data analyst that connects to all your data and answers questions with reports and visualizations. Free for up to 3 seats - no credit card required.

Get started free

Frequently asked questions

Does this integration require a paid ChatGPT plan?

Yes. Custom apps in ChatGPT require a Plus, Team, or Enterprise account. Free accounts don't support custom MCP apps.

Do I need Developer Mode enabled in ChatGPT?

Yes. Developer Mode is required to add unverified MCP apps. Enable it in Settings -> Apps -> Advanced Settings. Note that turning on Developer Mode disables ChatGPT's Memory feature while it's active.

How does authentication work? Do I need a Sequel API key?

No API key needed. Sequel uses OAuth, so ChatGPT will open a login flow when you create the app. You sign in to your Sequel account and authorize the connection. No manual token copying required.

How is this different from uploading a CSV export to ChatGPT?

Uploading a CSV gives ChatGPT a static snapshot. The Sequel MCP integration queries your live MySQL database, so you always get current data. No export step, no stale numbers.

Can ChatGPT modify data in my MySQL database?

If you use a read-only MySQL user (recommended), database modifications are blocked at the database level regardless of what ChatGPT requests.

Does this work with AWS RDS for MySQL or PlanetScale?

Yes. Any MySQL-compatible host works, including AWS RDS, PlanetScale, Railway, DigitalOcean Managed MySQL, and others.

Written by

Musthaq Ahamad
Musthaq Ahamad

Co-founder and CEO of Sequel. Previously built developer tools and data infrastructure. Passionate about making data accessible for everyone.