[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Limit MySQL database sizes

On Thu, Jan 23, 2003 at 06:50:30AM +0800, Jason Lim wrote:
> > > Normal filesystem quotas don't work, since the database is owned by
> user
> > > "MySQL" and not the user him/herself.
> >
> > You can chown the data files and make sure they're group-writable.
> Could you expand on that a bit? You mean make it owned by the user, and
> group writable by MySQL?


> > > Right now we're using a custom script that just reports any values
> over a
> > > certain amount, and the possibility to "trim" very large ones, but it
> > > would be much better if something like a proper quota could be put on
> (eg.
> > > 30Mb).
> > >
> > > Any ideas?
> >
> > There is no build-in mechanism yet.
> Mmm... then how on earth are those "Cpanels" and others doing it?

Never seen one, so I'm not sure.

I've been toying with the idea of writing a simple mysqlquotad that
would monitor space and revoke users's INSERT privileges until they
pruned their tables (after sufficient notificaiton, of course).

Wouldn't be too hard to do, I just haven't found the time yet...

Jeremy D. Zawodny     |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<Jeremy@Zawodny.com>  |  http://jeremy.zawodny.com/

Reply to: