10

First of all, I realize similar questions have been asked but none of them seem to have the same problem and I can't find a solution.

I can create tables and do write/read operations perfectly well within python accessing my SQLlite database. However, when trying to access the database through dbeaver I get the following issues:

  1. First, when trying to connect to the db file, it asks me "A file named database.db already exists. Do you want to replace it?"

  2. When trying to look at the tables via GUI it loads for a couple of seconds before showing an error

error

I have not found a way to solve this issue. Has anyone experience with this and a solution?

EDIT: I want to add what sqllite has to say about the given error: https://www.sqlite.org/rescode.html#busy

It states that the error occurs "because of concurrent activity by some other database connection". I don't know where this concurrent activity would come form though, as I'm closing everything and I'm just trying to look at the tables in the GUI. I think the issue has something to do with the first issue where it asks me if I want to replace the file.

PretendNotToSuck
  • 384
  • 2
  • 10

2 Answers2

12

Based on the previous comments, uninstall DBeaver snap

snap remove dbeaver-ce

and install using the .deb package from the official site

wget https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb
sudo apt install ./dbeaver-ce_latest_amd64.deb

this works for me.

all the credits to the previous comments =)

Marcelo Lara
  • 136
  • 2
  • 7
  • Hi Marcelo, just to point that the fix you're giving solves a configuration issue with snaps: snaps run in some kind of container, so they doesn't access the file system in a regular way, if not well configured they doesn't find the files that are there. The regular debian app runs over the file system as expected, so works nice. – Hans Poo Dec 04 '22 at 10:39
1

TLTR: If your database file is located in a mountable filesystem, you need to give dbeaver permission to read files from a mountable filesystem.

I have found 2 ways to solve this issue on ubuntu:

1: Make sure your database file is in home directory. Since dbeaver has permission to access your home directory, it will work.

OR

2: If you have downloaded dbeaver from:

  • ubuntu software center directly or
  • from the terminal using snap install

and your database file is located in a mountable filesystem, heard over to ubuntu software center => installed, find dbeaver in the list then click on it, on the next window top left, click on the permissions and toggle Read system mount information and disk quotas, put in your password in the authentication prompt and you're good to go.

josh
  • 91
  • 6