dbTalk Databases Forums  

How to limit database size?

mailing.database.mysql-win32 mailing.database.mysql-win32


Discuss How to limit database size? in the mailing.database.mysql-win32 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John Dalberg
 
Posts: n/a

Default How to limit database size? - 02-04-2005 , 03:50 PM








Is there a way to limit the database size under Windows?


--
John Dalberg

Reply With Quote
  #2  
Old   
Bill Karwin
 
Posts: n/a

Default Re: How to limit database size? - 02-10-2005 , 03:14 PM






John Dalberg wrote:
Quote:
Is there a way to limit the database size under Windows?
Sorry, no, from what I can tell, MySQL does not seem to have any feature
to enforce a limit on the database size.

Some people suggest using disk quota enforcement, but quota systems are
often enforced per-volume, not per file or per directory. If you need
to make a separate partition per database, you might as well make the
partition the size of their quota, and let the volume run out of space
as a means to enforce the quota. But that is also difficult because
MySQL only uses one directory to store databases (you might be able to
get around this by creating shortcuts, but this is starting to sound
more and more difficult to maintain).

Another person suggested monitoring database size and if it exceeds the
limit, revoke UPDATE and INSERT privileges from the user. But this
monitor would have to be constant, and is no guarantee that they won't
fill up your disk before you can enforce the quota.

I think another way to achieve it is through policy, not technology. If
you're doing this to allow paying customers to create database, tell
them they have some reasonable rate if they stay within their quota, but
the rate goes up a hundredfold for database space they use in excess of
their quota. Then let them worry about enforcement! ;-)

Actually, I'm kidding. I know this would not be acceptable to paying
customers.

The only other suggestion I can make is to use a different RDBMS product
that does provide this feature. For example, (choke) MS SQL Server.

Regards,
Bill K.


Reply With Quote
  #3  
Old   
John Dalberg
 
Posts: n/a

Default Re: How to limit database size? - 02-11-2005 , 10:20 AM



On Thu, 10 Feb 2005 13:14:26 -0800, Bill Karwin wrote:

Quote:
John Dalberg wrote:
Is there a way to limit the database size under Windows?

Sorry, no, from what I can tell, MySQL does not seem to have any feature
to enforce a limit on the database size.

Some people suggest using disk quota enforcement, but quota systems are
often enforced per-volume, not per file or per directory. If you need
to make a separate partition per database, you might as well make the
partition the size of their quota, and let the volume run out of space
as a means to enforce the quota. But that is also difficult because
MySQL only uses one directory to store databases (you might be able to
get around this by creating shortcuts, but this is starting to sound
more and more difficult to maintain).

Another person suggested monitoring database size and if it exceeds the
limit, revoke UPDATE and INSERT privileges from the user. But this
monitor would have to be constant, and is no guarantee that they won't
fill up your disk before you can enforce the quota.

I think another way to achieve it is through policy, not technology. If
you're doing this to allow paying customers to create database, tell
them they have some reasonable rate if they stay within their quota, but
the rate goes up a hundredfold for database space they use in excess of
their quota. Then let them worry about enforcement! ;-)

Actually, I'm kidding. I know this would not be acceptable to paying
customers.

The only other suggestion I can make is to use a different RDBMS product
that does provide this feature. For example, (choke) MS SQL Server.
Actually I also use SQL Server which has the feature of having a hard
database size.

I am planning to offer free hosting with MySQL and the fact that anyone can
create an account, create a MySQL database, run an insert until the
database size fills the partition and leaves is disheartening. The fact
also that all the databases must? reside in the same folder is also a big
problem. So quota managers won't help me in this situation.
So basically one database can prevent all other databases from growing is a
big concern. The MySQL designers didn't think this could be a big problem??

--
John Dalberg


Reply With Quote
  #4  
Old   
Bill Karwin
 
Posts: n/a

Default Re: How to limit database size? - 02-11-2005 , 12:32 PM



John Dalberg wrote:
Quote:
I am planning to offer free hosting with MySQL and the fact that anyone can
create an account, create a MySQL database, run an insert until the
database size fills the partition and leaves is disheartening.
... The MySQL designers didn't think this could be a big problem??
Normally you wouldn't give access to strangers to create such objects on
your computers.

I am suddenly more concerned with asking what measures you are taking to
prevent spammers from creating accounts, sending a few billion emails,
and then closing the account.

Regards,
Bill K.


Reply With Quote
  #5  
Old   
John Dalberg
 
Posts: n/a

Default Re: How to limit database size? - 02-11-2005 , 04:45 PM



On Fri, 11 Feb 2005 10:32:51 -0800, Bill Karwin wrote:

Quote:
John Dalberg wrote:
I am planning to offer free hosting with MySQL and the fact that anyone can
create an account, create a MySQL database, run an insert until the
database size fills the partition and leaves is disheartening.
... The MySQL designers didn't think this could be a big problem??

Normally you wouldn't give access to strangers to create such objects on
your computers.
Well.. even paid customers can fill up a database if they want to. If this
MySQL issue becomes a problem, I will discontinue it for free accounts.

Quote:
I am suddenly more concerned with asking what measures you are taking to
prevent spammers from creating accounts, sending a few billion emails,
and then closing the account.
They can send only 5-10 messages per day. Spammers wouldn't bother to open
an account with me with this limit. It's easier for them to zombie home
computers and send out through them. On top of that I might consider
enabling mail only when their dns settings point to my servers. This way I
know they are serious about hosting.
There are also other security measures involved.

--
John Dalberg


Reply With Quote
  #6  
Old   
Bill Karwin
 
Posts: n/a

Default Re: How to limit database size? - 02-11-2005 , 05:30 PM



John Dalberg wrote:
Quote:
There are also other security measures involved.
Sounds good, I'm glad you are thinking about it. I didn't mean to
besmirch your qualifications as a professional hosting service provider.

Good luck with the database issue, sorry that MySQL doesn't provide the
quota feature. I used Google to search for a solution, but found only
several threads with other people like you, finding no satisfactory
solution.

Regards,
Bill K.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.