MySQL DB 생성, USER 생성 및 권한 입력 쿼리

김아무개·2023년 5월 5일
0

MySQL

목록 보기
7/11

DB 목록 출력

show databases;

DB 생성

create database DB_NAME;

USER 생성

create user 'USER_NAME'@'localhost' identified by '비밀버노';

USER 확인 후 root 권한 주고 DB에 즉각 반영

select `user` from `mysql`.`user`;

show grants for 'USER_NAME'@'localhost';

grant all on `DB_NAME`.* to 'USER_NAME'@'localhost' with grant option;

flush privileges;
profile
Hello velog! 

0개의 댓글