How to access NextCloud SNAP MySQL database using GUI

Hello everyone, everything good?

I have a machine with the Ubuntu 22.04.2 LTS operating system installed, where there is an instance of NextCloud Snap running. The current version of NextCloud installed is 25.0.4. I need to access the tool’s database and view the MySQL tables. I am aware that NextCloud Snap has a service to access the database through the terminal, using the following command:

  • nextcloud.mysql-client

Through this service, I can view the existing tables and access their records. However, since it is done through the terminal, it is not easy to view. I would like to use a tool with a graphical interface to view the database information, such as MySQL Workbench or DBeaver CE. However, I have been unsuccessful in connecting to the database when using these tools. Is it possible to use one of these tools to view the NextCloud database?

@kyrofa

Hello, I was looking for options and information on the Web without success. What makes the connection difficult is the encapsulated or isolated form of the SNAP design.

The alternative way that I could find to this problem is to make a DUMP and then upload it to a test database where I can count on graphical tools that allow to better visualize the SQL queries. If anyone has more information, I’d be grateful. Greetings

Hello,

One can dump the DB via following command

sudo nextcloud.export -b

And then restore (in your case, after any edit) via,

sudo nextcloud.import -b path/to/backup/dir

Thanks.

Hi NaXal, I did exactly what you describe. At the moment it is the only way that I have found to make SQL queries using clients with a graphical interface that makes it easy to see the results of the queries.

Thanks for your quick response

1 Like