If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Limit the size of a Mysql-database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-12-04, 22:59
ttopholm ttopholm is offline
Registered User
 
Join Date: Jan 2004
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 01-13-04, 08:09
vanekl vanekl is offline
Registered User
 
Join Date: Nov 2003
Posts: 91
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.
Reply With Quote
  #3 (permalink)  
Old 01-15-04, 22:10
donsimon donsimon is offline
Registered User
 
Join Date: Jan 2004
Posts: 24
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.

Donny
__________________
http://www.phpscripts.com/
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On