Topic: MySQL & user quotas

Hello!

I suggest to clean from a starting script mysqld the following:

chown mysql:mysql "$datadir"

Since it disturbs to correct calculation of a disk quota of users, that is because of it, databases do not enter into a disk quota of users.

Regards,
Viktor.

Re: MySQL & user quotas

Sorry, but I don't think if another user (that the process owner) own the datadir it could works properly... (including for quota).

I see various solutions

1/ 1 mysqld process per user

You must wrote a init script for each user, a datadir for each user, and a config file.

I sometime use this multi-instance mysql solution.
That's ok if you have only a small number of users.



2/ 1 database per user

Of course, each user must/could not have the "creata database" right.
and then you must set owner/right on datadir/user (with setgid bit and probably some others)

In this case, innodb table will not be taken in account for quota (only MyISAM one)

+

Laptop:  Fedora 40 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: AlmaLinux 8 with EPEL, rpmfusion, remi