728x90
출처가 명확하지 않아서 원글 주인에겐 죄송합니다.
문제시 삭제합니다.
<권한설정>
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;
<기타>
# '사용자'가 '암호'으로 localhost 에서 db1 디비의 table1에 접속하도록 허용
grant all privileges on root.db1 to 사용자@'localhost' identified by '암호';
# '사용자'가 '암호'으로 111.222.333.444 에서 db1 디비의 모든 테이블에 접속하도록 허용
grant all privileges on root.* to 사용자@'111.222.333.444' identified by '암호';
# '사용자'가 '암호'으로 111.222.333.0/24 에서 모든 디비와 테이블에 접속하도록 허용
grant all privileges on *.* to 사용자 @'111.222.333.%' identified by '암호';
728x90
'mysql' 카테고리의 다른 글
aes 암호화 및 복호화 함수 (0) | 2013.09.08 |
---|---|
함수(function) 권한 및 기본 생성법 (0) | 2013.09.08 |
자동실행 설정 (0) | 2013.02.04 |
2013년2월3일 까지 mysql source 버젼 다운로드 주소 (0) | 2013.02.03 |
centos 6.3 mysql sourse 설치시 cmake (0) | 2013.02.03 |