I've just got a dedicated server that i'm slowly configuring for web/email hosting:
I've decided to have ONE Mysql install that all users will be given a single database within. I think I can install/configure that fine. Is it possible for each database to be stored in the user's home directory for disk quotering purposes?
Ideally, i'd like some/all users to be given their own Mysql "session" so that they can create/remove/use as many databases as they want. How would I go about configuring this? I've read the Mysql docs that mention multiple Mysql daemons but I didn't quite understand this from this perspective and i'm not sure is that's what I want?
MySQL database files need to be owned by mysql daemon process. So putting them in user directories would not be a good idea.
On the other hand having 50 users on the same machine with 50 instances of MySQL seems a very bad idea. That would make it like 50 virtual servers
If your only objective is disk quota, you should have a good script that can check the database directory size and sum up for a user to count it for disk quota. And again a nice interface for users to create/delete databases or change passwords a.k.a. control panel.
Although my post may not have explained it very well, the disk quotering was a side issue.
I have use 2 different shared-server providers in the past.
The first, allocated a single MySQL database as standard. This was given my username and if I requested another database it was given username_2 for example.
The second, had a MySQL instance (daemon ?) for each user. This meant that I could create as many databases as I wanted with whatever names I wanted.
I'd like to provide a similar system to the second ISP. Now, if this is going to cause a massive increase in overhead then i'll just write a little script that will allow users to create a database which woul dbe "username_<anything>". Thinking about it, the only limitation to that I must ensure each database name is unique.
There are a lot of ISPs who seem to have a daemon per user though. Any other thoughts on this?