Skip to content

Instantly share code, notes, and snippets.

@horitaku1124
Created October 12, 2014 07:03
Show Gist options
  • Save horitaku1124/dea86ade44bad57f9503 to your computer and use it in GitHub Desktop.
Save horitaku1124/dea86ade44bad57f9503 to your computer and use it in GitHub Desktop.
mysql

作成

GRANT usage ON `database1`.* TO 'user'@'localhost' IDENTIFIED BY 'password';
GRANT insert,select ON `database1`.comments TO 'user'@'localhost';
FLUSH PRIVILEGES;

権限削除

REVOKE ALL on *.* from 'user'@'%';
REVOKE ALL on *.* from 'user'@'localhost';
FLUSH PRIVILEGES;

ユーザー削除

DROP USER 'user'@'%';
DROP USER 'user'@'localhost';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment