서버/DB
[MySQL] 계정 생성 및 권한부여
com.yn.kim
2022. 2. 17. 15:26
-- 계정 생성
> create user ${User}@${Host} identified by ${Password}
-- User = login id
-- Host = remote ip | '%' (all)
-- Password = 486 (윤하...)
(하루에 네번 사랑을 말하고...여덟번 웃고...여섯번의...)
-- 모든 권한 부여
> grant all privileges on ${DB}.${Table} TO ${User}@${Host}
-- option identified by ${Password};
-- option 적용시 비밀번호 바뀜
-- DB = 적용할 Database ( possible * )
-- Table = 적용할 Table ( possible * )
-- 권한 적용
> flush privileges
-- 권한 확인
> show grants for ${User}@${Host}