友人間で共有 Web サーバーをセットアップしています。各 Web サイトには独自のデータベースがあります。これらの各データベースのユーザー管理をデータベースの所有者に委任できるようにしたいと考えています。そうすれば、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>