List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:May 11 2001 8:22pm
Subject:Re: Mysql Quota Support/DB Size Limitations
View as plain text  
In the last episode (May 10), Nathan Boley said:
> Hi, I was interested in implementing size limitations on specific
> databases. I've searched the mysql docs for an mention of quota
> support, but I am not able to find any.  I found that by chown the
> individual database directories and their files and then chmod them
> to be world readable I can access the database.  My assumption (as of
> yet untested) is that given the databases group read permission would
> give me similar results. Then, I can make use of Linux's quota
> system.  The problem arises with the creation of new tables; mysql
> creates all new tables as the user mysql. It doesn't seem as if it

For mysql to create files with different userids, it would have to run
as root and link its user.db to your /etc/passwd file.  There's an
easier way to to it, though.

If you chgrp each database directory to a different group and also set
the suid-group bit (chmod g+s), then any file created in the
subdirectories will inherit the group id of the parent directory (most
other Unixes don't need the setuid-group bit set, but it doesn't hurt).

Then you can set group quotas and enforce space restrictions that way.

	Dan Nelson
Mysql Quota Support/DB Size LimitationsNathan Boley11 May
  • Re: Mysql Quota Support/DB Size LimitationsPaul DuBois11 May
  • Re: Mysql Quota Support/DB Size LimitationsDan Nelson11 May