일반사용자 추가
grant all privileges on 디비이름.* to MySQL아이디@접속서버 identified by '패스워드' with grant option;
flush privileges;

특정 이름의 데이터베이스에 대한 사용자 추가
grant all privileges on `디비이름_%`.* to MySQL아이디@접속서버 identified by '패스워드' with grant option;
flush privileges;

전체 DB에 대해 권한을 가진 사용자 추가
grant all privileges on *.* to root@localhost identified by 'dbPass';
flush privileges;

특정 사용자에게 DB 권한 주기
GRANT ALL on DB명.* TO MySQL아이디@'localhost' ;
flush privileges;

+ Recent posts