MySQL & MariaDB Connections
TablePro provides full support for MySQL 5.7+, MySQL 8.0+, and MariaDB 10.x+. Both databases use the same connection interface since they share compatible protocols.
Quick Setup
Open Connection Form
Click New Connection from the Welcome screen or File > New Connection
Select Database Type
Choose MySQL or MariaDB from the type selector
Enter Connection Details
Fill in host, port, username, password, and optionally a default database
Test and Connect
Click Test Connection, then Create
Connection Settings
Required Fields
| Field | Description | Default |
|---|
| Name | Connection identifier | - |
| Host | Server hostname or IP | localhost |
| Port | MySQL server port | 3306 |
| Username | MySQL user | root |
| Password | User password | - |
Optional Fields
| Field | Description |
|---|
| Database | Default database to use after connecting |
Leaving the database field empty allows you to browse all databases the user has access to.
Example Configurations
Local Development Server
Name: Local MySQL
Host: localhost
Port: 3306
Username: root
Password: (your password)
Database: (empty)
Docker MySQL Container
Name: Docker MySQL
Host: localhost
Port: 3306 (or your mapped port)
Username: root
Password: (password from MYSQL_ROOT_PASSWORD)
Database: (empty)
MAMP Pro
Name: MAMP MySQL
Host: localhost
Port: 8889 (MAMP default)
Username: root
Password: root
Database: (empty)
Remote Server
Name: Production DB
Host: db.example.com
Port: 3306
Username: app_user
Password: (secure password)
Database: production
For production databases, consider using SSH tunneling for secure connections.
MySQL vs MariaDB
While TablePro uses the same driver for both, there are minor differences:
| Feature | MySQL 8.0 | MariaDB 10.x |
|---|
| Default auth | caching_sha2_password | mysql_native_password |
| JSON support | Native | Compatible |
| Window functions | Yes | Yes |
| CTEs | Yes | Yes |
Features
Browsing Databases
After connecting, the sidebar shows all databases accessible to your user:
- Click the connection name in the sidebar
- Expand a database to see its tables
- Click a table to view its contents
For each table, TablePro provides:
- Structure: Column definitions, types, and constraints
- Indexes: All indexes including primary keys
- Foreign Keys: Relationships to other tables
- DDL: The CREATE TABLE statement
Query Execution
Execute queries with full MySQL syntax support:
-- Select with JSON
SELECT id, JSON_EXTRACT(data, '$.name') as name
FROM users
WHERE JSON_CONTAINS(roles, '"admin"');
-- Window functions
SELECT
department,
employee,
salary,
RANK() OVER (PARTITION BY department ORDER BY salary DESC) as rank
FROM employees;
-- CTEs
WITH RECURSIVE category_tree AS (
SELECT id, name, parent_id, 0 as level
FROM categories WHERE parent_id IS NULL
UNION ALL
SELECT c.id, c.name, c.parent_id, ct.level + 1
FROM categories c
JOIN category_tree ct ON c.parent_id = ct.id
)
SELECT * FROM category_tree;
Troubleshooting
Connection Refused
Symptoms: “Connection refused” or “Can’t connect to MySQL server”
Causes and Solutions:
-
MySQL server not running
# Check if MySQL is running
mysqladmin ping -h localhost -u root -p
# Start MySQL (macOS with Homebrew)
brew services start mysql
-
Wrong port
- Verify the port in MySQL:
SHOW VARIABLES LIKE 'port';
- Check your configuration file
-
MySQL not listening on TCP
- Check
skip-networking is not set in my.cnf
- Ensure
bind-address includes your client IP
Access Denied
Symptoms: “Access denied for user ‘xxx’@‘localhost’”
Solutions:
- Verify username and password
- Check user privileges:
SHOW GRANTS FOR 'username'@'localhost';
- Grant necessary permissions:
GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'localhost';
FLUSH PRIVILEGES;
MySQL 8.0 Authentication
MySQL 8.0 uses caching_sha2_password by default, which may cause connection issues.
Option 1: Use native password for specific user
ALTER USER 'username'@'localhost'
IDENTIFIED WITH mysql_native_password BY 'password';
Option 2: Change default authentication method
# In my.cnf
[mysqld]
default_authentication_plugin=mysql_native_password
SSL/TLS Connections
TablePro supports SSL/TLS encryption for MySQL and MariaDB connections. Configure SSL in the SSL/TLS section of the connection form.
| SSL Mode | MySQL Behavior |
|---|
| Disabled | SSL is explicitly disabled |
| Preferred | Uses SSL if the server supports it, falls back to unencrypted |
| Required | Enforces SSL encryption (MYSQL_OPT_SSL_ENFORCE) |
| Verify CA | Enforces SSL and verifies the server certificate against the CA |
| Verify Identity | Enforces SSL, verifies CA, and validates the server hostname |
For Verify CA and Verify Identity modes, provide the path to your CA certificate file. Optionally, you can also provide client certificate and key files for mutual TLS authentication.
Most cloud MySQL providers (AWS RDS, Google Cloud SQL, Azure) require SSL. Use Verify CA mode with the provider’s CA certificate for the best security.
If you don’t need SSL but want encrypted connections, SSH tunneling is an alternative that encrypts all traffic through an SSH tunnel.
Large Result Sets
For tables with millions of rows:
- Use
LIMIT in your queries
- Enable pagination in the data grid settings
- Create appropriate indexes for common queries
Complex Queries
-
Use
EXPLAIN to analyze query plans:
EXPLAIN SELECT * FROM users WHERE email LIKE '%@example.com';
-
Monitor query execution time in the results panel
Character Sets
TablePro defaults to UTF-8 (utf8mb4) for MySQL connections, ensuring proper handling of:
- International characters
- Emoji
- Special symbols
If you encounter encoding issues, verify your table/column character sets:
SHOW CREATE TABLE table_name;
Next Steps