반응형
DB 보기
show databases;
DB 생성
create database DB이름
유저 생성
create user '유저이름'@'localhost' identified by '비밀번호';
유저 확인
select `user` from `mysql`.`user`;
작은 따옴표가 아니라 역따옴표이다.
유저 권한 확인
show grants for '유저이름'@'localhost';
유저 권한 부여
grant all on `DB이름`.* to '유저이름'@'localhost' with grant option ;
with grant option 을 붙여줌으로써 유저에 권한 부여 권한까지 줄 수 있다.
DB이름 부분은 역따옴표다.
권한 관련으로 DB가 다시 읽도록하는기능
권한 문제가 발생시 한번 해볼것.
flush privileges ;
반응형
댓글