We use cookies to understand how the site is used and to display ads. Analytics and advertising only run after you accept. You can change your choice anytime. Privacy policy

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 database· Setup 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 manager· Monitor connections.
# Database - Sessions Manager
# Shows active connections/queries
# Kill hanging queries:
# Right-click - Kill Session

# Monitor locks:
# Right-click - Locks

SQL Editor

SQL editor shortcuts· Speed 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 data· Export 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 data· Diff 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 Diagram· View 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 config· Connect 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