> For the complete documentation index, see [llms.txt](https://docs.coupler.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coupler.io/sources/category/files-and-tables/mysql.md).

# MySQL

Export MySQL tables and views to Google Sheets, BigQuery, Excel, or AI tools—no SQL skills needed. Schedule automatic refreshes with Coupler.io.

MySQL is a popular open-source relational database management system. With Coupler.io, you can automatically export data from any MySQL table or view to Google Sheets, Excel, BigQuery, Looker Studio, or even AI destinations like Claude and ChatGPT — on a schedule that works for you.

## Why connect MySQL to Coupler.io?

* **No SQL expertise required** — select a table or view and export it in minutes
* **Keep data fresh** — schedule automatic refreshes so your spreadsheets and dashboards always have the latest data
* **Send to your favorite tools** — export to Google Sheets, Excel, BigQuery, Looker Studio, Claude, ChatGPT, Cursor, Gemini, Perplexity, or OpenClaw
* **Multiple tables in one flow** — combine data from different MySQL tables using Join or Append transformations

## Prerequisites

* A MySQL database (version 5.7 or later)
* Database credentials: hostname, port, username, and password
* The database user must have SELECT permission on the table(s) you want to export
* If your MySQL server is behind a firewall, you'll need to allow Coupler.io's IP addresses

## Quick start

{% hint style="success" %}
If your MySQL database is hosted on a cloud provider (AWS RDS, Google Cloud SQL, Azure, etc.) or behind a firewall, whitelist these IP addresses in your firewall or security group before connecting:

* `34.123.243.115`
* `34.170.96.92`
  {% endhint %}

{% stepper %}
{% step %}
**Log in to Coupler.io** and create a new data flow. Choose MySQL as your source.
{% endstep %}

{% step %}
**Enter your MySQL connection details:**

* **Host** — the hostname or IP address of your MySQL server (e.g., `localhost`, `192.168.1.100`, or `mysql.example.com`)
* **Port** — the port number (default is 3306)
* **Username** — the database user account
* **Password** — the user's password

Click **Test connection** to verify your credentials are correct.
{% endstep %}

{% step %}
**Select your database and table.** Enter the database name and choose the table or view you want to export from the dropdown.
{% endstep %}

{% step %}
**Choose your destination.** Pick where you want the data to go — Google Sheets, Excel, BigQuery, Looker Studio, or an AI destination like Claude or ChatGPT.
{% endstep %}

{% step %}
**Run the data flow.** Click **Run** to execute your first export. Once it completes successfully, you can schedule automatic refreshes.
{% endstep %}
{% endstepper %}

## Need help with IP whitelisting?

If your MySQL server is behind a firewall or security group, whitelist these IPs:

* **34.123.243.115**
* **34.170.96.92**

For AWS RDS, add these IPs to your security group's inbound rules (port 3306, TCP). For Google Cloud SQL, add them to your authorized networks. For other hosting providers, check their documentation on how to whitelist external IPs.

## MySQL data overview

When you connect a MySQL database to Coupler.io, you're exporting data directly from a table or view. The structure and content of the exported data depends entirely on your MySQL schema.

## What gets exported

You select a single table or view, and Coupler.io exports all rows and columns from that table (unless you apply filters). Each column in your MySQL table becomes a column in your destination spreadsheet, database table, or AI destination.

## Supported data types

MySQL's common data types are fully supported:

| Data Type                   | Example                         | How it appears     |
| --------------------------- | ------------------------------- | ------------------ |
| INT, BIGINT, FLOAT, DECIMAL | 42, 3.14                        | Numbers            |
| VARCHAR, CHAR, TEXT         | "Hello World"                   | Text               |
| DATE, DATETIME, TIMESTAMP   | 2024-01-15, 2024-01-15 10:30:00 | Date/time          |
| BOOLEAN                     | TRUE, FALSE                     | 1 or 0             |
| JSON                        | {"key": "value"}                | Text (JSON string) |

## Filtering and transformations

You can apply filters directly in Coupler.io to export only the rows you need — for example, orders from the last 30 days, or customers in a specific region. Use the date picker to set dynamic date ranges that refresh with each run.

If you need to combine data from multiple MySQL tables, use **Join** or **Append** transformations:

* **Join** — connect a customers table with an orders table using a shared ID
* **Append** — stack data from multiple similar tables into one export

## Common export scenarios

**Export a customer list to Google Sheets** — create a live spreadsheet that updates daily with new customer records, automatically filtered by status or signup date.

**Send sales data to BigQuery** — schedule hourly exports of your orders table to BigQuery for advanced analytics and historical tracking.

**Analyze data in Claude** — export your metrics table and send it directly to Claude for instant analysis and insights via the AI destination.

**Monitor performance in Looker Studio** — export a metrics table and connect it to a Looker Studio dashboard that refreshes daily.

## Use cases by role

{% tabs %}
{% tab title="Analysts" %}
**Export raw transaction data** — send your complete transactions table to BigQuery or a data warehouse for deeper analysis, filtering by date range or transaction type.

**Build live dashboards** — export aggregated metrics from MySQL to Google Sheets, then connect them to Looker Studio for real-time monitoring.

**Combine multiple data sources** — join your MySQL customer table with transaction data, then append results from a secondary database for a unified view.
{% endtab %}

{% tab title="Marketing teams" %}
**Track campaign performance** — export your campaigns table daily to Google Sheets, filtered by status or date range, for quick performance reviews.

**Send lead lists to Claude** — export your leads table directly to Claude to analyze lead quality, identify high-value segments, or draft outreach messaging.

**Monitor subscriber growth** — export your subscribers table to Looker Studio and watch subscription trends update daily.
{% endtab %}

{% tab title="Operations" %}
**Automate reporting** — schedule daily exports of your key metrics table to Excel or Google Sheets for stakeholder reports.

**Track inventory** — export your inventory table hourly to monitor stock levels and alert the team to low-stock items.

**Audit database changes** — export your audit log or activity table regularly to maintain compliance and track system changes.
{% endtab %}

{% tab title="Finance teams" %}
**Export financial data** — send your transactions, invoices, or account tables to BigQuery or Excel for reconciliation and reporting.

**Analyze trends** — export historical data (filtered by date) and send it to Claude for instant trend analysis and forecasting insights.

**Consolidate data** — join multiple finance tables (revenues, expenses, payables) and append data from different business units into one unified export.
{% endtab %}
{% endtabs %}

## Platform-specific notes

* **AWS RDS** — whitelist Coupler.io IPs in your security group's inbound rules (port 3306, TCP)
* **Google Cloud SQL** — add Coupler.io IPs to your authorized networks list
* **Azure Database for MySQL** — configure firewall rules to allow Coupler.io's IPs
* **DigitalOcean Managed Databases** — add Coupler.io IPs to your firewall
* **Hosted providers (Bluehost, SiteGround, etc.)** — contact support to whitelist IPs, or ask your provider how to enable remote database access
* **Views** — Coupler.io supports exporting from views as well as base tables
* **Large tables** — tables with millions of rows may require splitting into smaller date ranges or using filters to avoid timeouts

## MySQL common issues

### Connection issues

<details>

<summary>"Connection refused" or "Cannot connect to MySQL server"</summary>

Your MySQL server is not reachable. Check:

1. **Hostname and port** — make sure you're using the correct hostname or IP address and port (default is 3306)
2. **Server is running** — verify your MySQL service is active
3. **Firewall/security group** — if your database is on AWS RDS, Google Cloud SQL, or behind a corporate firewall, you must whitelist Coupler.io's IPs: **34.123.243.115**\
   and **34.170.96.92**
4. **Network connectivity** — test connectivity from your local machine using a MySQL client (e.g., `mysql -h hostname -u username -p`)

</details>

<details>

<summary>"Access denied for user" or authentication failure</summary>

Your credentials are incorrect or the user doesn't have the right permissions.

1. **Verify username and password** — double-check spelling and special characters
2. **Check user permissions** — the user must have SELECT permission on the database and table(s). Run this in MySQL to grant access:

   ```sql
   GRANT SELECT ON database_name.* TO 'username'@'%';
   ```
3. **Test credentials locally** — try connecting with the same credentials using a MySQL client from your computer
4. **Remote access** — if using `'username'@'localhost'`, change it to `'username'@'%'` to allow remote connections

</details>

<details>

<summary>IP whitelisting: "Your MySQL is blocking Coupler.io"</summary>

Your firewall or security group is rejecting Coupler.io's connection attempt.

1. **Add these IPs to your firewall:**
   * 34.123.243.115
   * 34.170.96.92
2. **AWS RDS** — edit your security group, add an inbound rule for TCP port 3306, source: 34.123.243.115 and 34.170.96.92
3. **Google Cloud SQL** — go to Connections > Public IP > Authorized networks, add both IPs with /32 CIDR
4. **Azure MySQL** — Server parameters > Connection security > Firewall rules, add both IPs
5. **Other providers** — check your hosting provider's documentation for adding IP allowlists

</details>

### Missing data

<details>

<summary>Exported data is missing rows or columns</summary>

1. **Check table permissions** — the user account must have SELECT permission on all columns and rows. Run:

   ```sql
   GRANT SELECT ON database_name.table_name TO 'username'@'%';
   ```
2. **Verify the table name** — make sure you selected the correct table (case-sensitive in some MySQL configurations)
3. **Filters applied** — check if any filters are active in your data flow that might be hiding rows
4. **View definition** — if exporting a view, verify the view's SQL is correct and returns the expected data

</details>

<details>

<summary>Data appears to be truncated or incomplete</summary>

Large tables or long-running queries can timeout.

1. **Apply filters** — filter by date range or status to reduce the volume of data (e.g., last 30 days instead of all history)
2. **Split into multiple flows** — create separate data flows for different date ranges or logical subsets of data
3. **Check query performance** — run the same query in MySQL Workbench or command line to confirm it completes quickly
4. **Contact support** — if your export consistently times out, reach out; we can investigate timeout settings

</details>

### Permission errors

<details>

<summary>"Permission denied" or "Table doesn't exist"</summary>

1. **Verify the database name** — MySQL database and table names are case-sensitive on Linux/Mac
2. **Check user privileges** — ensure the user has SELECT on the specific database:

   ```sql
   GRANT SELECT ON database_name.* TO 'username'@'%';
   FLUSH PRIVILEGES;
   ```
3. **Verify user host** — if the user is set up for `'username'@'localhost'`, change to `'username'@'%'` for remote access
4. **Test locally** — connect to MySQL locally with the same credentials and run `SELECT * FROM table_name;` to confirm access

</details>

### Data discrepancies

<details>

<summary>Data in my spreadsheet doesn't match what I see in MySQL</summary>

1. **Timestamp/timezone issues** — MySQL may store times in UTC; check if a timezone offset is causing mismatches
2. **Data type formatting** — JSON or complex data types may display as text strings; MySQL stores them as strings, so this is expected behavior
3. **Filters applied** — verify no filters are active in your data flow that would exclude rows
4. **Deleted or updated rows** — if your MySQL data changed between exports, the spreadsheet will reflect the latest export

</details>

<details>

<summary>Timestamps or dates are incorrect</summary>

1. **Timezone mismatch** — MySQL TIMESTAMP columns are stored in UTC; if your application uses a different timezone, convert in MySQL:

   ```sql
   SELECT CONVERT_TZ(timestamp_column, '+00:00', '-05:00') FROM table_name;
   ```
2. **DATETIME vs TIMESTAMP** — DATETIME stores raw values (no timezone), while TIMESTAMP converts to UTC; check which your table uses
3. **Destination formatting** — Google Sheets or Excel may display dates differently; check the cell format in your destination

</details>

### Rate limits

<details>

<summary>"Query timeout" or "The operation timed out"</summary>

Your query is taking too long to execute, likely due to table size or slow query performance.

1. **Apply filters** — restrict data by date range, status, or other criteria:

   ```
   WHERE created_at >= '2024-01-01' AND created_at < '2024-02-01'
   ```
2. **Export smaller batches** — split large tables into multiple data flows (e.g., one flow per month)
3. **Optimize your table** — ensure indexes exist on commonly filtered columns (created\_at, status, user\_id, etc.)
4. **Reduce frequency** — if scheduling hourly exports, consider switching to daily to reduce database load
5. **Contact support** — if timeouts persist on small queries, we can investigate further

</details>

## MySQL FAQ

<details>

<summary>Can I export the results of a custom SQL query?</summary>

Not directly in Coupler.io — you must select a table or view. However, you can **create a MySQL view** that runs your custom query, then export that view. For example:

```sql
CREATE VIEW my_custom_view AS
SELECT order_id, customer_name, total
FROM orders
WHERE status = 'completed'
AND created_at >= DATE_SUB(NOW(), INTERVAL 30 DAY);
```

Then in Coupler.io, select that view as your table. This gives you the flexibility of custom SQL with the simplicity of Coupler.io's interface.

</details>

<details>

<summary>Can I export multiple MySQL tables in one data flow?</summary>

Yes! Use **Join** or **Append** transformations to combine data from multiple tables:

* **Join** — if you have a customers table and an orders table, you can join them on customer\_id to export orders with customer details side-by-side
* **Append** — if you have similar tables (e.g., sales\_q1, sales\_q2), you can stack them into one export

Add these transformations in Coupler.io after selecting your first table.

</details>

<details>

<summary>What if my MySQL database is behind a VPN or corporate firewall?</summary>

You must whitelist Coupler.io's IP addresses:

* **34.123.243.115**
* **34.170.96.92**

Contact your IT or database administrator to add these IPs to your firewall rules. Once whitelisted, the connection should work immediately.

</details>

<details>

<summary>Can I use SSH tunneling to connect?</summary>

SSH tunneling is not currently supported in Coupler.io. If your MySQL database is not directly accessible, you have two options:

1. **Whitelist Coupler.io's IPs** in your firewall or security group
2. **Create a database user with remote access** if your hosting provider allows it

If neither is possible, contact our support team to discuss alternatives.

</details>

<details>

<summary>How often can I schedule exports?</summary>

You can schedule data flows to run as frequently as every hour. However, for large tables (millions of rows), start with a daily schedule to ensure exports complete reliably. Once confirmed, you can increase frequency.

</details>

<details>

<summary>What happens if my MySQL database goes down during a scheduled export?</summary>

The data flow will fail, and you'll see a failed status in Coupler.io. Your destination (Google Sheets, BigQuery, etc.) will not be updated. Once your database is back online, the next scheduled run will attempt the export again. You can also manually trigger a run using the **Run** button.

</details>

<details>

<summary>Can I export data to Google Sheets, Excel, BigQuery, and a spreadsheet simultaneously?</summary>

Yes! In your data flow, you can add multiple destinations. Set up the first destination, then click **Add another destination** to send the same data to multiple tools.

</details>

<details>

<summary>Can I send MySQL data directly to Claude or ChatGPT?</summary>

Yes! Select an AI destination (Claude, ChatGPT, Cursor, Gemini, Perplexity, or OpenClaw) instead of a spreadsheet or database. Your MySQL data will be exported and sent to the AI for analysis, summarization, or insights.

</details>

<details>

<summary>How do I filter data by a date range that updates automatically?</summary>

Use Coupler.io's date picker in the filter settings. Instead of hardcoding dates, select a dynamic range like "Last 30 days" or "This month." The filter recalculates with each scheduled run, so your export always contains recent data.

</details>

<details>

<summary>My MySQL table has millions of rows. How do I export it without timeouts?</summary>

Apply filters to reduce the volume:

1. **Filter by date** — export the last 30 or 90 days instead of all history
2. **Filter by status** — export only active or completed records
3. **Split into multiple flows** — create one flow per month or per status value
4. **Optimize indexes** — ensure indexes exist on filtered columns (created\_at, status, etc.)

Start with a manual run to test, then schedule if it completes successfully.

</details>

<details>

<summary>Can I append data from multiple MySQL databases into one export?</summary>

Yes! Create two separate data flows (one for each database), export to a temporary location, then use the **Append** transformation to combine them. Alternatively, if both databases are on the same server, you can join tables across databases using the fully qualified table name: `database_name.table_name`.

</details>

<details>

<summary>I'm using AWS RDS. How do I allow Coupler.io to connect?</summary>

1. Open your **RDS instance** in the AWS console
2. Go to **Security groups** (or **VPC security groups**)
3. Edit the inbound rule for MySQL (port 3306)
4. Add a new rule: Type = MySQL/Aurora, Protocol = TCP, Port = 3306, Source = 34.123.243.115 and 34.170.96.92
5. Save and test the connection in Coupler.io

</details>

{% hint style="info" %}
For more detailed connection steps, see the [README](https://docs.coupler.io/sources/category/files-and-tables/mysql.md). For troubleshooting specific errors, check [Common Issues](#mysql-common-issues). For optimization tips, visit [Best Practices](https://docs.coupler.io/sources/category/files-and-tables/mysql/best-practices.md).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.coupler.io/sources/category/files-and-tables/mysql.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
