Are you looking for steps to install DBeaver on Ubuntu? Here’s how we do it.
Here at Bobcares, we have seen several such Ubuntu related installations as part of our Server Management Services for web hosts and online service providers.
Today we’ll see how to install DBeaver on Ubuntu.
A few facts about DBeaver
DBeaver CE is a free and open-source SQL client that is mainly designed for Developers, SQL programmers, Analysts, and Database administrators.
Moreover, it supports any database which has a JDBC driver. However, if you need support for non-JDBC data sources then you can consider using DBeaver Enterprise Edition.
DBeaver is based on the Eclipse platform and is a good workbench tool for building SQL queries, editing, and transferring data, viewing trees of objects, and a lot more.
Install DBeaver on Ubuntu 20.04/18.04/16.04 and Debian 10/9
Now let’s see how our Support Engineers DBeaver on Ubuntu.
1. Install Java on Ubuntu / Debian
To install java and set as default Java on your Ubuntu 20.04/18.04/16.04, run the below command.
sudo apt -y install openjdk-11-jdk openjdk-11-jre
Make sure to confirm the version.
$ java -version
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment (build 11.0.5+10-post-Ubuntu-0ubuntu1.118.04)
OpenJDK 64-Bit Server VM (build 11.0.5+10-post-Ubuntu-0ubuntu1.118.04, mixed mode, sharing)
Install OpenJDK on Debian 10/9
The default Java development and runtime available on Debian 10/9 repository is OpenJDK. So install it by running the below command.
sudo apt -y install default-jdk
Make sure to check the Java version.
$ java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-2~deb9u1-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
2. Add Debian repository and Install DBeaver CE
Run the below commands to add the DBeaver repository to your Debian / Ubuntu.
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
Update the apt list and install DBeaver CE after adding the repo.
sudo apt update
sudo apt -y install dbeaver-ce
You can check the DBeaver version by running,
$ apt policy dbeaver-ce
dbeaver-ce:
Installed: 6.3.2
Candidate: 6.3.2
Version table:
*** 5.3.1 500
500 https://dbeaver.io/debs/dbeaver-ce Packages
100 /var/lib/dpkg/status
3. Prepare Database Server
First, you would need to create a database and database user to connect to, before you launch and configure the DBeaver.
Install MariaDB on Debian
1. First, update the system apt index
$ sudo apt -y update
$ sudo apt -y install software-properties-common gnupg2
$ sudo apt -y upgrade
$ sudo reboot
2. Then import the MariaDB gpg key and add the repository
$ sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
$ sudo add-apt-repository ‘deb [arch=amd64] http://mariadb.mirror.liquidtelecom.com/repo/10.4/debian buster main’
3. After that, install MariaDB 10.4 on Debian 10 (Buster) by running the commands.
$ sudo apt update
$ sudo apt install mariadb-server mariadb-client
4. Now its time to secure the MariaDB server. So run the secure script to set the root password and remove the test database and disable remote root user login.
$ sudo mysql_secure_installation
You will be prompted with the below questions. Make sure to answer them.
Enter current password for root (enter for none): Just press the Enter
Set root password? [Y/n]: Y
New password: Enter password
Re-enter new password: Repeat password
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
Make sure to provide a username and password to access the MySQL console.
Install MariaDB on Ubuntu
For installing MariaDB 10.4 on Ubuntu, you need to add MariaDB repository to the system.
1. First, install software-properties-common if missing
$ sudo apt update
$ sudo apt-get install software-properties-common
2. Then to import the MariaDB gpg key, run the below command to add Repository Key to the system.
$ sudo apt-key adv –recv-keys –keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
3. Now add the apt repository
$ sudo add-apt-repository “deb [arch=amd64,arm64,ppc64el] http://mariadb.mirror.liquidtelecom.com/repo/10.4/ubuntu $(lsb_release -cs) main”
4. Now install MariaDB Server on Ubuntu by running the below commands.
$ sudo apt update
$ sudo apt -y install mariadb-server mariadb-client
Now you will be asked for the MariaDB root password, so enter it.
Press <Ok> to confirm the new password and install MariaDB.
However, if you didn’t receive a password set prompt, then manually run the MySQL hardening script.
$ sudo mysql_secure_installation
You will be prompted with the below questions. Make sure to answer them.
Enter current password for root (enter for none): Just press the Enter
Set root password? [Y/n]: Y
New password: Enter password
Re-enter new password: Repeat password
Remove anonymous users? [Y/n]: Y
Disallow root login remotely? [Y/n]: Y
Remove test database and access to it? [Y/n]: Y
Reload privilege tables now? [Y/n]: Y
After installation, the service must start automatically.
$ sudo systemctl status mysql
Now log into the MySQL shell as root user and create a test database to connect from the DBeaver Database tool as shown below.
$ mysql -u root -p
Enter password:
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;
4. Launching DBeaver
Now its time to launch the DBeaver. You can either do it from your terminal or Applications Launcher for your Desktop Environment.
1. First, create a new database connection – Specify database type.
2. Now provide the database access details – Server, database user
3. Finally, click “Test Connection” to verify the connection. When you are asked to download the MariaDB connection driver, please agree by clicking the Download button.
Finally, the connection test should return success. As a result, you should now see the database created earlier under the MariaDB connection profile. Now you can manage your database, tables, triggers, Procedures, Views, Events, etc using DBeaver.
[Need any further assistance with Ubuntu queries? – We are here to help you.]
Conclusion
In today’s writeup, we saw how our Support Engineers install DBeaver on Ubuntu.
0 Comments