Gratan: MySQL権限管理ツール

いつものアレです。 https://github.com/winebarrel/gratan

以下の様なDSLMySQLの権限を管理します。

require 'other/grantfile'

user "scott", "%" do
  on "*.*" do
    grant "USAGE"
  end

  on "test.*" do
    grant "SELECT"
    grant "INSERT"
  end
end

user "scott", "localhost", expired: '2014/10/10' do
  on "*.*", with: 'GRANT OPTION' do
    grant "ALL PRIVILEGES"
  end
end