반응형

1. 계정생성

 

use mysql;

 

create user '계정아이디'@localhost identified by '비밀번호';

 

create user '계정아이디'@'%' identified by '비밀번호';

 

2. 디비생성

create database testdb;

 

3. 권한주기

grant all privileges on '디비명'.'테이블명' to '계정명'@'호스트' identified by '계정비밀번호' with grant option;

 

flush privileges;

 

grant all privileges on testdb.* to 'testman'@'localhost' identified by '1111' with grant option;

 

flush privileges;

 

반응형

+ Recent posts