Preloader image
DDD

데이터베이스

flush privileges;

작성자 관리자 (admin)
조회수 2,063
입력일 2023-08-24 16:50:45

## DB 접속
mysql -u root -p
mariadb -u root -p

## sample 조회
use mysql;
select host, user, password from user;

## sample 생성
create user 'sga'@localhost identified by '1';
create user 'abc'@'%' identified by '1';

## 권한 생성
grant select on '스키마'.* to `sample`@`localhost` identified by '1';
grant select on '스키마'.* to `sample`@`%` identified by '1';         

## 모든 권한 부여
grant all privileges on '스키마.테이블' to 'sample'@'localhost' identified by '1';
grant all privileges on '스키마.테이블' to 'sample'@'%' identified by '1';

## 수정사항 반영
flush privileges;

^