Database
MySQL기본 User 생성 및 권한 설정
Steven J.S Min
2013. 2. 26. 21:53
1. User 생성
create user '아이디'@'localhost' identified by '비밀번호';
localhost or % ( : 원격 접속가능)
2. User 권한 부여
grant select, insert, update, delete, create, drop, alter on 지정DB이름.* to '아이디'@'localhost';
all privileges : 모든 권한 / *.* : 모든DB / with grant option : 권한위임가능
3. User 권한 보기
show grants for '아이디'@'localhost(또는%)';
4. 권한 적용
flush privileges;
5. 모든 user 보기 , mysql DB의 user table
use mysql;
select user from user;
6. User 삭제
drop user '아이디'@'접속영역(localhost or %)';
참고 : http://blog.naver.com/twkang76?Redirect=Log&logNo=140091986073