Skip to content
>_devvkit
$devvkit learn --librarie dbeaver-guide

DBeaver Guide

[database][gui][sql][multi-db]
Database Clients
Install
# Download from dbeaver.io/download/
# Or:
brew install --cask dbeaver-community
# Windows: download .exe from website
# Linux: sudo snap install dbeaver-ce

DBeaver is the most popular free universal database tool. It supports PostgreSQL, MySQL, SQLite, Oracle, SQL Server, MongoDB, Cassandra, Redis, and 70+ more via JDBC drivers. The Community Edition is free and open-source.

Key features: SQL editor with auto-completion, ER diagram viewer (right-click table to View Diagram), data export (CSV, JSON, Excel, SQL INSERT), data import, result-set filtering/sorting, and SSH tunneling for remote databases.

DBeaver also has a CLI mode (dbeaver-cli) for scripting. Use the Data Transfer wizard to copy tables between databases. The ER diagram is reverse-engineered from your schema. Alternatives: TablePlus, DataGrip, pgAdmin.

Setup

Connect to databaseSetup connection.
# GUI: Database - New Database Connection
# Select type (PostgreSQL, MySQL, etc.)
# Enter host, port, database, user, password
# Test Connection to verify
# Finish to add to Database Navigator
Session managerMonitor connections.
# Database - Sessions Manager
# Shows active connections/queries
# Kill hanging queries:
# Right-click - Kill Session

# Monitor locks:
# Right-click - Locks

SQL Editor

SQL editor shortcutsSpeed up querying.
# Ctrl+Enter: Execute current statement
# Ctrl+Shift+Enter: Execute all
# Ctrl+Space: Auto-complete
# Ctrl+D: Duplicate line
# Ctrl+/: Toggle comment
# F5: Refresh
# F4: Open object editor

Data Export

Export dataExport result to file.
# GUI:
# 1. Run query
# 2. Right-click results - Export Data
# 3. Choose: CSV, JSON, XML, Excel, Markdown, SQL INSERT
# 4. Choose columns and options
# 5. Finish

# CLI:
dbeaver-cli -connection mydb -sql "SELECT * FROM users" -export /tmp/users.csv
Compare dataDiff tables.
# Right-click table - Tools - Compare Data
# Select source and target connections
# Shows: rows only in source, only in target, changed
# Great for syncing dev/staging databases

ER Diagram

ER DiagramView table relationships.
# Method 1:
# Database Navigator - Right-click table - View Diagram

# Method 2:
# Window - Perspective - ER Diagram
# Drag tables from Navigator into diagram

# Features: foreign key lines, PK display, export as PNG/PDF

SSH Tunnel

SSH Tunnel configConnect via SSH.
# In connection settings - Main tab - toggle SSH
# Then:
# Host: jump-server.example.com
# User: ssh_user
# Auth: key file (~/.ssh/id_rsa)
# Then set database host as localhost