I have a shared web server setup among friends. Each website has its own database. I’d like to be able to delegate user management for each of those databases to the owner of the database. That way they can create accounts for their web applications to access their specific tables yet not wander around if the specific application is compromised.
To further clarify by way of example, I’d like something like this:
Database server at : db.hosting.coop
db root user : root@db.hosting.coop <full permissions as root>
website and database 1: foo.com
foo.com db user : foo@db.hosting.coop <full permissions on database foo, with ability to grant user access to database foo, granted by root@db.hosting.coop>
foo.coms rails app db user : foorails@localhost <select,insert,update,delete on foo.*, granted by foo@db.hosting.coop>
website and database 2: bar.com
bar.com db user : bar@% <full permissions on database foo, with grant, granted by root@db.hosting.coop>
bar.coms php app db user : bar_website@localhost <select,insert,update,delete on bar.*, granted by bar@db.hosting.coop>
As root:
As foo:
likewise with others