mysql root 계정에 다른 아이피 허용하기

create user ‘root’@’10.11.22.33’ identified by ‘암호’;
grant all privileges on *.* to ‘root’@’10.11.22.33’ with grant option;

중요한 것이 ‘with grant option’ 이다.
all privileges으로 모든 권한을 줘도 권한을 설정할 수 있는 권한이 없어서 완벽한 root가 아님

그리고 mysql 8에서는 flush privileges가 필요없다고 한다.

Leave a Comment