我在朋友之间有一个共享的网络服务器设置。每个网站都有自己的数据库。我希望能够将每个数据库的用户管理委托给数据库的所有者。这样,他们可以为他们的 Web 应用程序创建帐户以访问他们的特定表,而不会在特定应用程序受到破坏时四处游荡。
为了通过示例进一步澄清,我想要这样的东西:
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>