[GRANT 구문사용하기]
mysql> grant all on *.* to '아이디'@'localhost' identified by 'PASS';
mysql> grant all on DB.* to '아이디'@'localhost' identified by 'PASS';
mysql> grant select on DB.* to '아이디'@'localhost' identified by 'PASS';
mysql> grant update on DB.* to '아이디'@'localhost' identified by 'PASS';
mysql> grant select,update on DB.* to '아이디'@'localhost' identified by 'PASS';
mysql> flush privileges;
[Mysql 원격 접속 설정]
mysql> grant all on DB명.* to 아이디@접속아이피 identified by 'PASS';
mysql> grant all on DB명.* to 아이디@'%' identified by '패스워드'; // 전체 아이피
mysql> flush privileges;
[컬럼에 권한 설정]
mysql> GRANT SELECT (column_1), INSERT (column_1,column_2) ON DB.* TO 'someuser'@'localhost';
[root 변경]
mysql> update user set password = password('패스') where user='root';
[계정 삭제 설정]
mysql> drop user 아이디@localhost;
[grant 주요 privilege 옵션]
- SELECT,UPDATE,INSERT,DELETE,FILE
- ALTER,CREATE,INDEX,PROCESS,RELOAD,DROP,EXECUTE
[grant 기타 privilege 옵션]
- CREATE TEMPORARY TABLES
- LOCK TABLES,REPLICATION CLIENT
- REPLICATION SLAVE
- SHOW DATABASES
- SHUTDOWN
- SUPER
- GRANT OPTION
[출처] http://blog.naver.com/natecap/40162132395
''.' Programs > DB' 카테고리의 다른 글
DB_교육 1일차 (0) | 2012.09.18 |
---|---|
[데이터베이스] 트랜젝션 특징 (0) | 2012.03.14 |
[MYSQL] 데이터 베이스 개발 툴 !! (0) | 2012.03.07 |