Skip to content

Instantly share code, notes, and snippets.

@evalphobia
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evalphobia/43f65f62fc79a79d319e to your computer and use it in GitHub Desktop.
Save evalphobia/43f65f62fc79a79d319e to your computer and use it in GitHub Desktop.

パーミッション

リードオンリーユーザーの作成

GRANT SELECT ON *.* TO <ユーザー名>@'%' IDENTIFIED BY '<パスワード>';
FLUSH PRIVILEGES;

スレーブステータス閲覧権限

GRANT SUPER, REPLICATION CLIENT ON *.* TO <ユーザー名>@'%' IDENTIFIED BY '<パスワード>';
FLUSH PRIVILEGES;
SHOW GRANTS FOR <ユーザー名>;

テーブル全権限

GRANT ALL PRIVILEGES ON `<テーブル名>`.* TO '<ユーザー名>'@'%' WITH GRANT OPTION
FLUSH PRIVILEGES;
SHOW GRANTS FOR <ユーザー名>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment