mysql 계정권한 추가 및 설정

PIZZU·2019년 1월 25일
0
create user 설정할계정id@localhost identified by '설정할 패스워드';      #계정추가
create user 계정id@'%' identified by '패스워드';       #계정에 권한주기
grant all privileges on 데이터베이스명.* to 계정id@'%' identified by '패스워드' with grant option;      # 외부 ip로 접근 할 수 있도록 권한 주기
ex)grant all privileges on id.* to id@'%' identified by 'password' with grant option;
flush privileges; //적용하기
  • 위와같이 했는데 되지 않았을경우 아래처럼 다시 한번 해주면 됨.
GRANT ALL PRIVILEGES ON *.* TO '계정명'@'%' IDENTIFIED BY '비밀번호' WITH GRANT OPTION;
GRANT TRIGGER ON *.* TO '계정명'@'%' WITH GRANT OPTION;
GRANT SUPER ON *.* TO '계정명'@'%';
FLUSH PRIVILEGES;
profile
pizzu's blog

0개의 댓글