행위

Mysql 사용자

DB CAFE

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';