In this blog post, I’ll discuss how to install DBeaver Database Tool on Ubuntu 22.04|20.04|18.04|16.04 Linux system. DBeaver CE is a free and open source multi-platform database management tool/SQL client designed for Developers, SQL programmers, Analysts, and Database administrators.
DBeaver supports any database which has JDBC driver – MySQL/MariaDB, PostgreSQL, Oracle, DB2 LUW, Google BigQuery, Exasol, SQL Server, Sybase/SAP ASE, SQLite, Firebird, H2, HSQLDB, Derby, Teradata, Vertica, Netezza, Informix, etc. If you need support for non-JDBC data sources such as WMI, MongoDB, Cassandra, Redis, then consider using DBeaver Enterprise Edition.
DBeaver is based on Eclipse platform and is a good workbench tool for building SQL queries, editing, and transferring data, viewing trees of objects, completing database administration tasks, monitoring database connection sessions, and a lot more.
Follow steps below to Install DBeaver on Ubuntu 22.04|20.04|18.04|16.04 Linux machine.
Step 1: Install Java (OpenJDK) on Ubuntu
OpenJDK is the default Java development and runtime available on Debian repository. Run the following commands to have Java installed and set as default Java on your Ubuntu 22.04|20.04|18.04|16.04.
sudo apt update sudo apt -y install default-jdk
$ java -version openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
Step 2: Add Debian repository and install DBeaver CE
Add DBeaver repository to your Debian / Ubuntu by running the commands below:
wget -O - https://dbeaver.io/debs/dbeaver.gpg.key | sudo apt-key add - echo "deb https://dbeaver.io/debs/dbeaver-ce /" | sudo tee /etc/apt/sources.list.d/dbeaver.list
After adding the repo, update the apt list and install DBeaver CE:
sudo apt update sudo apt install dbeaver-ce
Install DBeaver version can be checked using:
$ apt policy dbeaver-ce dbeaver-ce: Installed: 21.1.3 Candidate: 21.1.3 Version table: *** 21.2.3 500 500 https://dbeaver.io/debs/dbeaver-ce Packages 100 /var/lib/dpkg/status
Step 3: Prepare Database Server
Before launching and configuring DBeaver service, you may first need to create a database and database user to connect to. For this demonstration, I’ll use the MariaDB database server.
You can install MariaDB Database server by using our previous guides below.
- Install MariaDB on Debian Linux
- Install MariaDB on Ubuntu
You can also use MySQL
Once you have a database server, log in to MySQL shell as root user and create a test database to connect from DBeaver Database tool.
$ mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 48 Server version: 10.3.11-MariaDB-1:10.3.11+maria~bionic-log mariadb.org binary distribution Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> CREATE DATABASE test_db; MariaDB [(none)]> CREATE USER 'test_user'@'localhost' IDENTIFIED BY 'StrongPassword'; MariaDB [(none)]> GRANT ALL PRIVILEGES ON test_db.* TO 'test_user'@'localhost'; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> QUIT;
Step 4: Launching DBeaver on Ubuntu / Debian System
You can either Launch DBeaver from your terminal or Applications Launcher for your Desktop Environment.
1. Create a new database connection – Specify database type.
2. Provide database access details – Server, database user
3. Click “Test Connection” to verify the connection. When asked to download mariadb connection driver, please agree by clicking
Your connection test should then return a success.
You should now see database created earlier under MariaDB connection profile.
You can now manage your database, tables, triggers, Procedures, Views, Events e.t.c using DBeaver.
That’s all. Enjoy using SQL editor provided by DBeaver to generate and test SQL queries on a GUI as opposed to CLI.