I asked a similiar question on the main list, but received no answers, so
I'll post a revised version here.
We are offering our hosting customers MySQL databases. Ideally, I would
like to offer everyone unlimited databases. What I would like is an option
that when connecting to a database as a user, the MySQL server would access
the actual database in the directory of the username. That way users could
create and delete databases normally, and no names would conflict with other
users.
Because each user connecting would have his/her own database, the normal
authentication does not need to be used. I think a good solution is to use
PAM, since it is widely used, and has a variety of authentication modules
available.
When the client connects, the server would use PAM to check if the username,
password and client host are allowed. It would then change the root
directory for databases to that of the username. For example, if the user
databases were stored in /db/, and the username was joe, then it would use
/db/joe/ for all of the databases for that connection. The user could then
create, modify and delete databases at will.
This would be a very powerful feature, but I don't know how difficult it
would be to implement it. Can anyone who has worked with the MySQL codebase
comment on this? Is there a point to working on it for the 3.23 branch? I
would really like to have this feature, but I don't know the direction to
take with this.
Thanks,
--
David Phillips <david@stripped>
http://david.acz.org/