반응형
RANT문을 사용해 사용자를 추가하거나 권한을 부여할수도 있습니다.
GRANT ALL ON TO @ IDENTIFIED BY '비밀번호';
사용자 권한 삭제는 REVOKE문을 사용하시면 됩니다.
REVOKE ON FROM ;
1) user1에 모든 db의 권한을 줄때 ( root를 제외한 super user : dba )
localhost의 권한
grant all privileges on *.* to user1@localhost identified by 'pass1';
%의 권한
grant all privileges on *.* to user1 identified by 'pass1';
2) user1에 db1의 사용권한을 줄때
localhost의 권한
grant all privileges on db1.* to user1@localhost identified by 'pass1';
%의 권한
grant all privileges on db1.* to user1 identified by 'pass1';
3) user1에 db1의 tb1의 권한을 줄때
localhost의 권한
grant all privileges on db1.tb1 to user1@localhost identified by 'pass1';
%의 권한
grant all privileges on db1.tb1 to user1 identified by 'pass1';
권한 삭제는
REVOKE all on *.* from user1
반응형
'Programming' 카테고리의 다른 글
[리팩터링 카탈로그] 1. 기본적인 리팩터링 (0) | 2021.12.05 |
---|---|
Intellij IDEA LiveReload 기능 사용하기 (0) | 2021.12.05 |
키보드 숨기기 - 다른 여백 눌렀을때 (0) | 2013.11.25 |
Installing PDO_OCI and OCI8 PHP extensions on CentOS 6.4 64bit (0) | 2013.10.18 |