SQL

mysql 유저 생성후 권한 줄때 에러 해결방법

집요한 개발자 2021. 12. 27. 11:31

create user 'id'@'%' identified by 'password';

 

grant all privileges on *.* to 'id'@'localhost';

이렇게 권한을 주려하면 에러가 발생한다.

 

해결방법은

grant all privileges on `%`.* to 'id'@'localhost'with grant option;

 

최종 권한 적용 

FLUSH PRIVILEGES;로 최종적으로 권한을 적용시킨다