리눅스
mysql / mariadb 유저생성 및 권한설정
LibRat
2023. 7. 28. 11:06
반응형
간단명령어
create user 'root'@'%' identified by 'root';
grant all privileges on *.* to 'root'@'%';
사용자 생성
create user '사용자'@'localhost' identified by '비밀번호';
create user '사용자'@'192.168.0.1' identified by '비밀번호';
create user '사용자'@'192.168.0.%' identified by '비밀번호';
DB 권한
grant all privileges on *.* to '사용자'@'localhost';
grant all privileges on DB이름.* to '사용자'@'192.168.0.%';
grant all privileges on DB이름.TABLE이름 to '사용자'@'192.168.0.%';
사용자 삭제
drop user '사용자'@'localhost';
drop user '사용자'@'192.168.0.%';
반응형