<권한설정>
grant all privileges on 디비명.테이블명 to 사용자@'접속지 주소' identified by '암호' (with grant option);
grant all privileges on *.* to root@'%' identified by '암호' with grant option;
grant all privileges on *.* to root@'localhost' identified by '암호' with grant option;
<권한 제거>
revoke all on 디비명.테이블명 from 사용자;
<권한 적용>
# 모든 명령 후에 항상 아래 명령을 실행해야 실제로 적용된다.
flush privileges;
<기타>
# '사용자'가 '암호'으로 111.222.333.0/24 에서 모든 디비와 테이블에 접속하도록 허용
grant all privileges on *.* to 사용자 @'111.222.333.%' identified by '암호';
# '사용자'가 '암호'으로 111.222.333.444 에서 db1 디비의 모든 테이블에 접속하도록 허용
grant all privileges on db1.* to 사용자@'111.222.333.444' identified by '암호';
# '사용자'가 '암호'으로 localhost 에서 db1 디비의 table1에 접속하도록 허용
grant all privileges on db1.table1 to 사용자@'localhost' identified by '암호';
'미분류' 카테고리의 다른 글
[박혜웅] 라즈베리파이 입문 (raspberry pi & XBMC) (0) | 2013.03.11 |
---|---|
[박혜웅] SSL Security Warning (0) | 2012.07.20 |
인코딩 관련 좋은 링크들 character set, encoding (UTF-8, EUC-KR, Unicode, BOM) (0) | 2011.11.30 |
오픈소스 라이센스 비교 (0) | 2011.02.18 |
[박혜웅] CentOS 5.5 용 yum repository (rpmforge) 추가 (0) | 2010.11.18 |