MySQL / MariaDB
SoftDB supports both MySQL and MariaDB through the same driver. You get multi-database browsing, full table and column introspection, TLS configuration, a structure designer, and transaction support.
Quick Setup
Section titled “Quick Setup”-
Open the Connection Hub and click New Connection.
-
Select MySQL or MariaDB as the database type.
-
Fill in your connection details:
- Host:
localhost - Port:
3306 - Username:
root(or your user) - Password: your password
- Database: leave blank to browse all databases, or enter a specific database name
- Host:
-
Click Test Connection, then Save.
-
Open the connection. The sidebar shows your databases, tables, views, and functions.
Connection Settings
Section titled “Connection Settings”| Field | Default | Notes |
|---|---|---|
| Host | localhost | Hostname or IP of the MySQL/MariaDB server |
| Port | 3306 | Standard MySQL/MariaDB port |
| Username | — | Required |
| Password | — | Stored encrypted |
| Database | — | Optional. Leave blank to enable multi-DB browsing |
| SSL Mode | disable | See TLS modes below |
TLS Modes
Section titled “TLS Modes”| Mode | Description |
|---|---|
disable | No TLS. Default for local development. |
require | Require TLS, skip certificate verification. |
verify-ca | Require TLS and verify the server certificate against a CA. |
verify-full | Require TLS, verify the CA, and verify the hostname. |
Multi-Database Browsing
Section titled “Multi-Database Browsing”When you leave the Database field blank, SoftDB runs SHOW DATABASES and filters out system databases (information_schema, performance_schema, mysql, sys). The sidebar shows a three-level tree:
Connection└── my_app ├── users ├── orders └── products└── analytics └── eventsUnlike PostgreSQL, MySQL doesn’t require a reconnect to switch databases. SoftDB issues a USE <database> statement to switch context, so browsing across databases is fast.
If you specify a database name in the connection settings, only that database appears in the tree.
Structure Designer
Section titled “Structure Designer”The structure designer supports creating and modifying tables visually. Supported operations:
| Operation | Supported | Notes |
|---|---|---|
| Create table | Yes | |
| Add column | Yes | |
| Rename column | Yes | Requires a modern MySQL or MariaDB server |
| Change column type | Yes | Requires confirmation — rebuilds the full column definition |
| Change column default | Yes | |
| Change column nullability | Yes | Rebuilds the full column definition |
| Drop column | Yes | Destructive, requires confirmation |
SQL Examples
Section titled “SQL Examples”Basic JOIN
Section titled “Basic JOIN”SELECT u.id, u.name, COUNT(o.id) AS order_count, SUM(o.total) AS total_spentFROM users uLEFT JOIN orders o ON o.user_id = u.idGROUP BY u.id, u.nameORDER BY total_spent DESCLIMIT 20;Subquery
Section titled “Subquery”-- Find users who have placed more orders than averageSELECT id, nameFROM usersWHERE id IN ( SELECT user_id FROM orders GROUP BY user_id HAVING COUNT(*) > (SELECT AVG(cnt) FROM (SELECT COUNT(*) AS cnt FROM orders GROUP BY user_id) t));GROUP BY with HAVING
Section titled “GROUP BY with HAVING”-- Products with more than 100 sales in the last 30 daysSELECT p.name, SUM(oi.quantity) AS units_soldFROM order_items oiJOIN products p ON p.id = oi.product_idJOIN orders o ON o.id = oi.order_idWHERE o.created_at >= NOW() - INTERVAL 30 DAYGROUP BY p.id, p.nameHAVING units_sold > 100ORDER BY units_sold DESC;SHOW commands
Section titled “SHOW commands”-- Inspect table structureDESCRIBE users;
-- Show indexes on a tableSHOW INDEX FROM orders;
-- Show current databaseSELECT DATABASE();Transactions
Section titled “Transactions”MySQL and MariaDB support explicit transactions for DML statements:
START TRANSACTION;
UPDATE accounts SET balance = balance - 100 WHERE id = 1;UPDATE accounts SET balance = balance + 100 WHERE id = 2;
COMMIT;Troubleshooting
Section titled “Troubleshooting”Connection refused
Section titled “Connection refused”failed to ping mysql: dial tcp 127.0.0.1:3306: connect: connection refusedMySQL/MariaDB isn’t running, or it’s listening on a different port. Check the service status with systemctl status mysql or systemctl status mariadb. Verify the port in /etc/mysql/my.cnf or /etc/my.cnf.
Access denied
Section titled “Access denied”failed to ping mysql: Error 1045 (28000): Access denied for user 'root'@'localhost'Wrong username or password. If you’re connecting from a remote host, the user may not have remote access. Grant it with:
CREATE USER 'myuser'@'%' IDENTIFIED BY 'password';GRANT ALL PRIVILEGES ON mydb.* TO 'myuser'@'%';FLUSH PRIVILEGES;SSL connection error
Section titled “SSL connection error”failed to ping mysql: x509: certificate signed by unknown authorityThe server requires TLS but the certificate can’t be verified. Try require mode first (skips verification). If you need full verification, ensure the CA certificate is trusted on your system.