Install DBeaver

If you created a VM, make sure you are running these steps as the normal user in that VM; not on the host system.

These instructions are for Pop!_OS, they should be similar for Ubuntu.

There are a couple of ways to install it.

I went with Linux Shout's version: #1st Method Using an APT repository

Connect to IBM DB2 LUW

This part was a little tricky.

Open the app and click on "New Database Connection".

Select DB2 for LUW

Here's the problem:

All the tutorials, posts, and videos say:

Host=localhost and Port=50000 or Port=50001

But this doesn't work.

There are 2 issues with this:

  1. Wrong Host
  2. Wrong Port

Cat the /etc/hosts file. In this VM, it looks like:

~ ❯❯❯ cat /etc/hosts
127.0.0.1   localhost
::1         localhost
127.0.1.1   pop-os.localdomain  pop-os
~ ❯❯❯

And, in the DB2 install log, it says: Port 25000.

So, in this VM, the correct parameters are:

  • Host: pop-os
  • Port: 25000

Fill in the other parameters:

  • Database (probably: sample)
  • Username (probably: db2inst1)
  • Password (whatever it is)

and press the "Test Connection" button.

If this is the first time you are making a connection, you will have to download the drivers.

After that, you should see a dialog box pop up stating: Connected.