469,338 Members | 8,156 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,338 developers. It's quick & easy.

disk quota in MySQL

Hello,

Is there a way to assign a limit on the size of a specific database? For
example database A can take up no more than 500 MB.
One of my databases can potentially grow without any bounds and possibly
stop other critical databases from operating.
We are using MySQL 4.0.21 on Linux. We use innodb tables.

Thanks!
- Rajesh
Aug 23 '05 #1
1 2327
Rajesh Kapur wrote:
Is there a way to assign a limit on the size of a specific database?


This question comes up on this newgroup from time to time.
I've searched for a solution, but there are no satisfactory ones.

Some solutions involve having a scheduled job detect when a database has
exceeded the authorized space, and then raise it to the attention of the
system administrator.

Some solutions involve trying to use the operating system's quota
enforcement (where available), but this solution is complex and usually
insufficient, because MySQL databases are generally all owned by one
user id, and stored under one directory. So unless the quota
enforcement can be made per-directory or per-file, it's hard to use this
way. Also, InnoDB tables are all stored together in one physical file,
regardless of how many databases they belong to.

Some solutions involve putting the database files on separate
filesystems, and symbolically link them into MySQL's data directory.
When the filesystem fills up, further writes get fatal errors. But this
is not a very good strategy for graceful error handling.

MySQL has no built-in property to define and enforce a limit to the size
or number of records in a database or table. At least, not that I've found.

Regards,
Bill K.
Aug 25 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Bart Simpson | last post: by
reply views Thread by Andrew Crook | last post: by
1 post views Thread by Simon Hall | last post: by
2 posts views Thread by Joe | last post: by
3 posts views Thread by =?Utf-8?B?bWFkY3lyeWw=?= | last post: by
5 posts views Thread by mostro713 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.