> ## Documentation Index
> Fetch the complete documentation index at: https://ngquct-feat-ai-sql-walkthroughs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MySQL

> Connect to MySQL 5.7 and later with the bundled MariaDB Connector/C driver

# MySQL Connections

TablePro connects to MySQL 5.7 and later through its bundled driver, built on MariaDB Connector/C. MySQL 8's `caching_sha2_password` auth works out of the box. MariaDB uses the same driver; MariaDB-specific notes are on [MariaDB](/databases/mariadb).

## Quick Setup

<Steps>
  <Step title="Create Connection">
    Click **Create Connection** on the welcome window, pick **MySQL**, and fill in host, port, and credentials
  </Step>

  <Step title="Test and Save">
    Click **Test Connection** to verify, then **Save & Connect**
  </Step>
</Steps>

## Connection Settings

| Field        | Default     | Notes                                              |
| ------------ | ----------- | -------------------------------------------------- |
| **Host**     | `localhost` |                                                    |
| **Port**     | `3306`      |                                                    |
| **Username** | empty       | Leave empty to let the server pick its own default |
| **Database** | empty       | Optional. Leave empty to browse all databases      |

<Tip>
  URLs like `mysql://user:pass@host/db` open a connection directly. See [Connection URL Reference](/databases/connection-urls).
</Tip>

## Common Setups

| Where             | Settings                                                              |
| ----------------- | --------------------------------------------------------------------- |
| Homebrew          | `localhost:3306`                                                      |
| Docker            | `localhost` with the mapped port, password from `MYSQL_ROOT_PASSWORD` |
| MAMP Pro          | `localhost:8889`, user and password `root`                            |
| AWS RDS / Aurora  | Endpoint hostname, password or [AWS IAM](/databases/aws-iam)          |
| Google Cloud SQL  | [Cloud SQL Auth Proxy](/databases/cloud-sql-proxy)                    |
| Remote production | [SSH tunnel](/databases/ssh-tunneling)                                |

## AWS IAM Authentication

RDS and Aurora connections can use your AWS identity instead of a static password: TablePro signs a fresh 15-minute token on every connect and reconnect. Setup and troubleshooting are on [AWS IAM Authentication](/databases/aws-iam).

## Google Cloud SQL

Turn on **Cloud SQL Auth Proxy** in the connection form and enter the instance connection name; TablePro starts and stops the proxy for you. See [Cloud SQL Auth Proxy](/databases/cloud-sql-proxy).

## Users & Roles

**View > Users & Roles** manages users, roles, and privileges on MySQL servers. Changes are staged, undoable, and shown as SQL before they run. See [Users & Roles](/features/users-roles).

## Query Plans

**EXPLAIN** and **EXPLAIN FORMAT=JSON** results render as a visual plan diagram. See [EXPLAIN Visualization](/features/explain-visualization).

<Frame caption="EXPLAIN rendered as a visual plan">
  <img className="block dark:hidden" src="https://mintcdn.com/ngquct-feat-ai-sql-walkthroughs/REI9tfF_TGivM099/images/explain-diagram.png?fit=max&auto=format&n=REI9tfF_TGivM099&q=85&s=19dcae38c110073cdc63359d3b3e27f2" alt="Visual EXPLAIN plan diagram" width="3024" height="1714" data-path="images/explain-diagram.png" />

  <img className="hidden dark:block" src="https://mintcdn.com/ngquct-feat-ai-sql-walkthroughs/REI9tfF_TGivM099/images/explain-diagram-dark.png?fit=max&auto=format&n=REI9tfF_TGivM099&q=85&s=1fadee46539aabd283b43df9b373943b" alt="Visual EXPLAIN plan diagram" width="3024" height="1714" data-path="images/explain-diagram-dark.png" />
</Frame>

## Browsing

The sidebar lists all accessible databases with each table's structure (columns, indexes, foreign keys) and DDL. Switch databases with **Cmd+K**. JSON columns, window functions, and CTEs run and display like any other query.

Table and column comments show in the UI: the sidebar dims a table's comment after its name, and the data grid header tooltip includes the column comment. Toggle this with **View > Show Object Comments**.

Set session variables (timezone, encoding) on connect with [Startup Commands](/databases/overview#startup-commands).

## SSL/TLS

New connections default to **Preferred**: the driver tries TLS first and retries in plain text only after an SSL handshake error (auth and network errors are not retried). This works for Cloud SQL, Azure MySQL, and local Docker alike. Use **Verify CA** with the provider's certificate for strict validation. See [SSL/TLS](/features/ssl).

## Troubleshooting

**Connection refused**: check the server is running (`brew services start mysql`), the port is right, and `skip-networking` is not set.

**Access denied**: verify credentials and privileges with `SHOW GRANTS FOR 'user'@'host';`.

**Auth plugin errors**: `caching_sha2_password` is supported natively. If a plugin error persists, check the user's plugin with `SELECT user, plugin FROM mysql.user;`.
