DBeaver is a free, open-source universal database tool that connects to virtually any database — MySQL, PostgreSQL, MongoDB, Redis, SQLite, Oracle, SQL Server, and dozens more. It provides a consistent interface for SQL editing, visual schema design, data import/export, and administration across all your databases. This guide covers installation, configuration, and productive use of DBeaver for managing multiple database systems.
Installation
# Ubuntu/Debian (Community Edition)
sudo snap install dbeaver-ce
# Or download .deb package
wget https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb
sudo dpkg -i dbeaver-ce_latest_amd64.deb
# macOS
brew install --cask dbeaver-community
# Windows — download from https://dbeaver.io/download/
Connecting to Databases
MySQL/MariaDB Connection
- Click the "New Database Connection" button (plug icon)
- Select MySQL from the list
- Enter connection details: host, port (3306), database, username, password
- On the "Driver properties" tab, set
allowPublicKeyRetrieval=trueif using MySQL 8+ - Click "Test Connection" to verify, then "Finish"
PostgreSQL Connection
- Select PostgreSQL from connection types
- Enter host, port (5432), database, username, password
- Check "Show all databases" on the PostgreSQL tab to see all databases in the navigator
SSH Tunnel Connection
For databases behind firewalls:
- In the connection dialog, go to the "SSH" tab
- Enable "Use SSH Tunnel"
- Enter SSH host, port, username, and authentication (password or key file)
- DBeaver creates the tunnel automatically when connecting
MongoDB Connection
- Select MongoDB from NoSQL database types
- Enter connection URI or individual fields
- For replica sets, use the full connection string:
mongodb://user:pass@node1,node2,node3/db?replicaSet=rs0
SQL Editor Features
DBeaver's SQL editor is powerful for daily database work:
- Auto-completion — Ctrl+Space for table/column names, functions, keywords
- Multi-statement execution — Ctrl+Enter executes current statement, Alt+X executes entire script
- Explain plan — Ctrl+Shift+E shows visual execution plan
- Format SQL — Ctrl+Shift+F reformats messy SQL
- Variables — use @variables in scripts that prompt for values at runtime
- Templates — type abbreviations and expand with Tab (e.g., "sf" → "SELECT * FROM")
-- Example: parameterized script
SELECT * FROM orders
WHERE customer_id = :customer_id
AND created_at > :start_date
ORDER BY created_at DESC;
-- DBeaver prompts for customer_id and start_date when executed
Data Editing and Transfer
Visual Data Editor
Double-click any table to open the data editor grid. Features include:
- Inline editing — click a cell to modify, Ctrl+S to save
- Filtering — click the filter icon to add WHERE conditions
- Sorting — click column headers to sort
- Row coloring — set conditional formatting based on column values
- Blob/JSON viewer — click BLOB or JSON cells to view/edit in dedicated viewers
Data Transfer (Import/Export)
# Right-click a table → Export Data
# Supports: CSV, JSON, XML, HTML, SQL INSERT, XLSX
# Configure: encoding, delimiter, null representation, batch size
# Right-click a table → Import Data
# Supports: CSV, JSON, XML, XLSX
# Maps columns automatically, shows preview before import
Cross-Database Data Transfer
DBeaver can transfer data between different database types:
- Right-click the source table → "Export Data"
- Choose "Database Table(s)" as the target
- Select the target database connection and table
- Map columns between source and target
- Execute the transfer
ER Diagrams
Generate visual entity-relationship diagrams:
- Right-click a database or schema → "View Diagram"
- DBeaver shows all tables with foreign key relationships
- Drag tables to arrange, export as PNG or SVG
- Create custom diagrams with selected tables only
Database Comparison
Compare schemas between databases (useful for staging vs. production):
- Select two tables/schemas in the navigator
- Right-click → "Compare/Migrate"
- DBeaver shows structural differences and generates migration SQL
Task Automation
# DBeaver supports scheduled tasks:
# 1. Window → Preferences → Database → Tasks
# 2. Create a task: data export, SQL script, or data transfer
# 3. Schedule it with a cron expression
# 4. Tasks run in the background, even with DBeaver minimized
Connection Pooling and Performance
# In connection settings → Connection Settings tab:
# - Keep-Alive: enable for long-running connections
# - Auto-disconnect: set idle timeout to avoid abandoned connections
# - Transaction mode: Auto-commit for exploration, Manual for changes
# Performance tips:
# - Set "Max results" to limit large result sets (default 200 rows)
# - Use "Read data in background" for non-blocking result loading
# - Enable "Lazy loading" for tables with many columns
Useful DBeaver Shortcuts
- Ctrl+Enter — Execute current SQL statement
- Ctrl+Shift+E — Explain execution plan
- Ctrl+Shift+F — Format SQL
- Ctrl+Space — Auto-complete
- Ctrl+] — Navigate to table definition
- Ctrl+Shift+U — Convert selection to uppercase
- F4 — Open selected table's properties
- Alt+Up/Down — Move SQL line up/down
Best Practices
- Organize connections in folders by environment (Development, Staging, Production)
- Color-code production connections red to prevent accidental changes
- Use transaction mode "Manual" for production databases to review changes before committing
- Save frequently used queries as SQL bookmarks for quick access
- Use SSH tunnels instead of exposing database ports publicly
- Export connection configurations and share with team members via Projects
- Keep DBeaver updated for new driver versions and security patches