권한 부여
mysql > grant all privileges on test_db.test_table to user1@host;
mysql> grant all privileges on test_db.* to user1@localhost;
mysql> grant all privileges on test_db.* to user1@localhost with grant option;
mysql> grant all privileges on test_db.* to user1@localhost identified by 'asdf';
mysql > grant all privileges on test_db.* to user1@'%' identified by 'asdf';
mysql> grant select, insert, update on test_db.* to user1@localhost;
mysql> grant all privileges on *.* to user1@localhost identified by 'asdf' with grant option;
mysql > flush privileges;
변경 사항 확인
mysql > SHOW GRANTS FOR user1@localhost;
+
| Grants for inhalin@localhost |
+
| GRANT USAGE ON *.* TO `user1`@`localhost` |
| GRANT ALL PRIVILEGES ON `test_db`.* TO `user1`@`localhost` WITH GRANT OPTION |
+
권한 제거
mysql> revoke all on test_db.* from user1;