Skip to main content

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

1

Open Connection Form

Click New Connection from the Welcome screen or File > New Connection
2

Select Database Type

Choose MySQL or MariaDB from the type selector
3

Enter Connection Details

Fill in host, port, username, password, and optionally a default database
4

Test and Connect

Click Test Connection, then Create

Connection Settings

Required Fields

FieldDescriptionDefault
NameConnection identifier-
HostServer hostname or IPlocalhost
PortMySQL server port3306
UsernameMySQL userroot
PasswordUser password-

Optional Fields

FieldDescription
DatabaseDefault 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:
FeatureMySQL 8.0MariaDB 10.x
Default authcaching_sha2_passwordmysql_native_password
JSON supportNativeCompatible
Window functionsYesYes
CTEsYesYes
If you encounter authentication issues with MySQL 8.0, see the Authentication Troubleshooting section.

Features

Browsing Databases

After connecting, the sidebar shows all databases accessible to your user:
  1. Click the connection name in the sidebar
  2. Expand a database to see its tables
  3. Click a table to view its contents
Database browser

Table Information

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:
  1. 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
    
  2. Wrong port
    • Verify the port in MySQL: SHOW VARIABLES LIKE 'port';
    • Check your configuration file
  3. 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:
  1. Verify username and password
  2. Check user privileges:
    SHOW GRANTS FOR 'username'@'localhost';
    
  3. 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 ModeMySQL Behavior
DisabledSSL is explicitly disabled
PreferredUses SSL if the server supports it, falls back to unencrypted
RequiredEnforces SSL encryption (MYSQL_OPT_SSL_ENFORCE)
Verify CAEnforces SSL and verifies the server certificate against the CA
Verify IdentityEnforces 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.

Performance Tips

Large Result Sets

For tables with millions of rows:
  1. Use LIMIT in your queries
  2. Enable pagination in the data grid settings
  3. Create appropriate indexes for common queries

Complex Queries

  1. Use EXPLAIN to analyze query plans:
    EXPLAIN SELECT * FROM users WHERE email LIKE '%@example.com';
    
  2. 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