Connect to MySQL and MariaDB
Connect QueryDeck to MySQL 5.7+, MySQL 8, and MariaDB, including PlanetScale.
For: everyone. Works for MySQL and MariaDB with the same driver.
QueryDeck talks to MySQL through libmysqlclient. Anything the mysql command-line client connects to, QueryDeck connects to. MariaDB works through the same driver thanks to wire-protocol compatibility.
Required fields
| Field | Default | Notes |
|---|---|---|
| Host | none | DNS name or IP. localhost for a local server. |
| Port | 3306 | Standard MySQL port. PlanetScale uses 3306 too. |
| User | none | Defaults to root on local servers, otherwise a provider-issued username. |
| Password | none | Stored in macOS Keychain. |
| Database | none | The schema name. In MySQL, "database" and "schema" mean the same thing. |
Paste a connection string
QueryDeck parses URIs in this format:
mysql://user:password@host:3306/database
mysql://user:password@host:3306/database?ssl-mode=REQUIREDmariadb:// is accepted as an alias for mysql://.
Provider-specific notes
PlanetScale
PlanetScale requires SSL and uses branch-aware connection strings.
- In your PlanetScale dashboard, open the database, choose the branch, and click "Connect".
- Pick the "General" connection method to get a username, password, host, and database.
- Paste into QueryDeck, or build the fields by hand.
- Set SSL mode to
REQUIRED.
PlanetScale does not support foreign keys at the database level. Table Mode's FK navigation will be empty unless you've added foreign keys at the application level. Drift Mode still works.
MariaDB
Use the same fields as MySQL. The server type is detected automatically once you connect.
AWS RDS for MySQL
Use the RDS endpoint as host, port 3306. SSL mode REQUIRED works for the default RDS certificate. If your security policy requires CA verification, set VERIFY_IDENTITY and add the certificate file in the SSL section.
If your RDS instance is private, see SSH tunnels.
DigitalOcean Managed MySQL
DigitalOcean issues a custom certificate. Set SSL mode to VERIFY_CA and download the CA from the DigitalOcean dashboard.
Self-hosted MySQL or MariaDB
Fill fields by hand. If your my.cnf requires SSL, set the SSL mode accordingly. For local development, DISABLED is fine.
SSL modes
MySQL uses different mode names than PostgreSQL:
| Mode | Use when |
|---|---|
DISABLED | Local development only. |
PREFERRED | Try SSL, fall back without. Default for many client libraries. |
REQUIRED | Demand SSL but don't verify the server certificate. |
VERIFY_CA | Demand SSL and verify the certificate authority. |
VERIFY_IDENTITY | Demand SSL, verify the CA, and check the hostname matches. |
Full reference: SSL/TLS modes.
Schemas
In MySQL, schemas are the databases. The sidebar shows the connected database first. To switch, change the Database field in the connection editor, or run USE other_db; in the query editor.
Known limitations
- MySQL's
JSONtype displays as text in the data grid. UseJSON_EXTRACT(...)or->>in queries to drill in. BLOBcolumns are shown as<binary>placeholders. Use queries to inspect or export.- Stored procedures are listed but not currently editable from the GUI.