빽기의 코딩공부Story

[MYSQL]MySQL 계정생성 및 권한 부여하기 본문

[DATABASE]/[MYSQL]

[MYSQL]MySQL 계정생성 및 권한 부여하기

빽기 2020. 8. 23. 01:04

▶DB 확인

# show databases;

 

▶ DB 변경하기 (mysql)

# use mysql;

 

▶계정 생성

# create user 'study'@'%' identified  by '1111';
	        //ID	//외부접근 허용	   //PW

▶ DB 생성

# create database 디비명 default character set utf8;

▶ DB권한 부여하기

# grant all privileges on studydb.* to 'study'@'%';
# flush privileges;

insert, update, delete 등 모든 명령어를 실행할 수 있다.

 

 

'[DATABASE] > [MYSQL]' 카테고리의 다른 글

[MYSQL]Windows10 MySQL 환경변수 설정하기  (0) 2020.08.23
[MySQL] MySQL 다운로드 설치 방법  (0) 2020.08.21
Comments