- 13.7.1.4 GRANT Syntax
- How To Create a New User and Grant Permissions in MySQL
- Remove Permissions for a MySQL User on Linux via Command Line
- MySQL에서 사용자 권한 주기 (grant 명령어)
권한설정
-- 문법 -- GRANT [type of permission] ON [database name].[table name] TO ‘[username]’@'localhost’; GRANT select ON dbname.tablename TO username; GRANT update ON dbname.tablename TO username; GRANT insert ON dbname.tablename TO username; GRANT delete ON dbname.tablename TO username; -- GRANT select, insert, update ON test.* TO username@localhost identified by 'password'; flush privileges;
설정해제
-- 설정된 GRANT 설정 보기 show grants for username; -- 문법 -- REVOKE permission ON database.table FROM 'user'@'localhost'; REVOKE INSERT, SELECT ON dbname.tablename FROM 'username';
반응형
'db > mysql' 카테고리의 다른 글
Ubuntu Mysql 5.7 upgrade (0) | 2016.06.09 |
---|---|
mysql get remote ip address (0) | 2015.12.22 |
mysql multi count (0) | 2015.11.03 |
MySQL db selection Error - ERROR 1184 (08S01) (0) | 2015.05.25 |
MySQL ORDER BY (0) | 2014.07.04 |