행위

"Mysql 사용자"의 두 판 사이의 차이

DB CAFE

(새 문서: = 사용자 추가 = <source lang=sql> $ create user '사용자'@'localhost' identified by '비밀번호'; </source> = DB 권한 부여 = <source lang=sql> $ grant all privileges on *...)
(차이 없음)

2019년 10월 2일 (수) 10:51 판

thumb_up 추천메뉴 바로가기


1 사용자 추가[편집]

$ create user '사용자'@'localhost' identified by '비밀번호';

2 DB 권한 부여[편집]

$ grant all privileges on *.* to '사용자'@'localhost';
$ grant all privileges on DB이름.* to '사용자'@'localhost';
  • .* : 모든 DB에 접근 가능

DB이름: DB이름 지정

3 사용자 계정 삭제[편집]

$ drop user '사용자'@'localhost';