MySQL DB Taking up a lot of space - how can I connect to it to see details and clear it out?

Git ticket: MySQL DB Taking up a lot of space - how can I connect to it to see details and clear it out? · Issue #1742 · nextcloud/nextcloud-snap · GitHub
Reddit discussion: https://www.reddit.com/r/NextCloud/comments/njwqab/mysql_db_taking_up_a_lot_of_space_how_can_i/

Describe the bug

The Nextcloud MySQL files are taking up >30GB for ~90GB worth of data. I can’t figure out how to connect to it to actually see which tables are taking up room and potentially clear them out.

I noticed that my filesystem was nearing max, so I added 15GB but another MySQL file was made within a couple of hours and took it all up instantly. You can see the drop in storage usage in this graph and then the sharp/sudden rise.

image

To Reproduce

Steps to reproduce the behavior:

Uncertain. My usage just started climbing rapidly in the past couple of weeks:
image

Expected behavior

I don’t expect MySQL to be taking up so much room for such a small amount of data.

Screenshots

If applicable, add screenshots to help explain your problem.

OS/snapd/snap version

What OS and version are you running? Please also include the output of the
following commands:

$ snap list nextcloud
jon@nextcloud:~$ snap list nextcloud
Name       Version      Rev    Tracking       Publisher   Notes
nextcloud  21.0.1snap1  27920  latest/stable  nextcloud✓  -

and:

$ snap version
jon@nextcloud:~$ snap version
snap    2.50
snapd   2.50
series  16
ubuntu  20.04
kernel  5.4.0-73-generic

Logs

jon@nextcloud:~$ sudo du -h --max-depth=1 /var/snap/nextcloud
18G	/var/snap/nextcloud/27920
17G	/var/snap/nextcloud/27697
90G	/var/snap/nextcloud/common
123G	/var/snap/nextcloud
jon@nextcloud:~$ sudo du -h --max-depth=1 /var/snap/nextcloud/27920
8.0K	/var/snap/nextcloud/27920/logrotate
1.2G	/var/snap/nextcloud/27920/nextcloud
3.4M	/var/snap/nextcloud/27920/certs
17G	/var/snap/nextcloud/27920/mysql
36M	/var/snap/nextcloud/27920/logs
19M	/var/snap/nextcloud/27920/redis
18G	/var/snap/nextcloud/27920

there is a mysql cli client integrated in snap.

1 Like

Hi Reiner_Nippes

It seem that we are on the same boat. See my post:

Cheers
Kenny