# GRANT [ 권한 ] ON [DB명].[TABLE명] TO [USER명]@[HOST명];
# GRANT ALL PRIVILEGES ON *.* TO 'LEE'@'192.168.0.%' ; * 'LEE'@'192.168.0.%' User에게 모든 DB의 모든 Table에 대해 모든 권한을 주겠다.
# SHOW GRANTS FOR 'LEE'@'192.168.0.%' ; * 'LEE'@'192.168.0.%' User 권한 조회 +-------------------------------------------------------------+ | Grants for LEE@192.168.0.% | +-------------------------------------------------------------+ | GRANT ALL PRIVILEGES ON *.* TO 'LEE'@'192.168.0.%' | +-------------------------------------------------------------+
권한 회수
# REVOKE [ 권한 ] ON [DB명].[TABLE명] FROM [USER명]@[HOST명];
# REVOKE ALL PRIVILEGES ON *.* FROM 'LEE'@'192.168.0.%';