Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Rajesh Kapur
August 23, 2005, 3:42 pm
rate this thread
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.
Re: disk quota in MySQL
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
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.
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum