Skip to content

Instantly share code, notes, and snippets.

@skyriser
Last active August 29, 2015 14:00
Show Gist options
  • Save skyriser/60b338757ab7591616ce to your computer and use it in GitHub Desktop.
Save skyriser/60b338757ab7591616ce to your computer and use it in GitHub Desktop.
MySQL R/RW User Template
GRANT SELECT, CREATE TEMPORARY TABLES ON DATABASE_NAME.* TO `DATABASE_NAME_r`@"192.168.%" IDENTIFIED BY '';
GRANT PROCESS ,SHOW DATABASES ON *.* TO `DATABASE_NAME_r`@"192.168.%" IDENTIFIED BY '';
GRANT ALTER, DELETE, INDEX, INSERT, SELECT ,UPDATE ,CREATE, DROP, CREATE TEMPORARY TABLES, LOCK TABLES, CREATE VIEW, SHOW VIEW ON `DATABASE_NAME`.* TO `DATABASE_NAME_rw`@"192.168.%" IDENTIFIED BY 'XXXXXXXXX';
GRANT PROCESS ,SHOW DATABASES ON *.* TO `DATABASE_NAME_rw`@"192.168.%" IDENTIFIED BY 'XXXXXXXXXX';
FLUSH PRIVILEGES;
@skyriser
Copy link
Author

skyriser commented May 2, 2014

192.168.% とかなってるのは適宜変更する。
あと、パスワード無しがアレだったら適宜アレする。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment