Database disk quotas

Hello
Does the control panel count database space towards the overall quota? I don’t think so. It’s not working correctly.
Can anyone help?

Up

Up

Quotas are managed by the OS and file system, and they only take into account files owned by the user. That said, the user’s DBs located in /var/lib/mysql/ and owned by mysql:mysql, so they don’t count against the user’s quota. I haven’t checked whether this can be easily fixed or not.

Well you can manually change the owner of the DB files but that is not a good idea when MariaDB is up and running and I don’t know whether that owner change could give some issues…

Current way is reasonable. Database tab can see the size. Need to show in quota?

The panel does not include occupied database space in the overall account quota.

What would you like the panel to do here — include DB space in the account quota, or just confirm how it works? The DB size is already visible in the Database tab.

The fact that it’s visible is one thing. But in reality, the database is most likely not included in the account’s overall quota. That’s probably just how it works. Essentially, if an account has 10 gigabytes allocated, and the database takes up 1 gigabyte, the account can write 11 gigabytes, since the database isn’t included in the quota and doesn’t limit disk space.
I might be wrong.

Right, the database doesn’t count toward the quota. Reason: quotas are filesystem-level and only count files owned by the user; the database files are owned by mysql:mysql, so they’re not included. A user’s actual writable space is roughly quota + database size, assuming the disk is large enough.

This does not look logical. I can order a 1gb shared hosting and put a 10gb, 100gb or 1TB database without any restrictions!

Currently, those DBs are included in the disk usage calculation, but since they are not owned by the user, the disk quota is not enforced for them.