Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2004

    Unanswered: Limit the size of a Mysql-database

    I have a mysql-server, and some of my mates.. are using a little of space on it, but how can I limit the size of there database, so they maybe only got 10mb each for there databse

  2. #2
    Join Date
    Nov 2003
    I believe the only way you can limit their disk use is by
    making them create their tables in a separate disk partition.
    See 'Create Table Systax' in the MySQL manaul.

    By using DATA DIRECTORY='directory' or INDEX DIRECTORY='directory' you can specify where the storage engine should put its datafile and index file. Note that the directory should be a full path to the directory (not a relative path). This only works for MyISAM tables in MySQL 4.0, when you are not using the --skip-symlink option. Your operating system must also have a working, threadsafe realpath() command.

  3. #3
    Join Date
    Jan 2004
    You can't limit the size of their diskspace via mysql easily. With 4.1.x you can limit the number of connections, updates, and queries per hour.

    There are some tricks that you can do to limit the amount of diskspace they have but they are not very easy to do. Basically what you have to do is limit their account via linux or whatever you are using. Then you don't allow their user to create databases, you create the database for them and have it sim linked to their user directory. That way they can't use more space than they have available with their hosting plan.

    Hope this helps.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts