mysql 계정 및 DB 생성

//db 생성

CREATE SCHEMA `db명` DEFAULT CHARACTER SET utf8 ;

 

//user 생성

create user ‘user’@’%’ identified by ‘pwd’;

 

//외부 허용

grant all privileges on *.* to ‘user’@’%’;

grant all privileges on db명.* to ‘user’@’%’;

 

 

//localhost 허용

create user ‘user’@’localhost’ identified by ‘pwd’;

grant all privileges on db명.* to ‘user’@’localhost’;

 

//적용

flush privileges

답글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다.

Back to Top