DB/MySQL
[ MariaDB ] 사용자 생성 및 권한부여
ucong
2021. 2. 4. 12:13
grant all privileges on '데이터베이스'.'테이블' to '사용자이름'@'접속위치(호스트명)' identified by '비밀번호';
grant all privileges on *.* to cong@'%' identified by 'cong1234';
grant all privileges on *.* to cong@'localhost' identified by 'cong1234';
*.* - 모든데이터베이스의 모든테이블에 대한 권한 부여
'%' - 특정 IP 지정, 모든 IP 허용
'localhost' - 내부에서만 허용