새소식

Database

MariaDB 사용자 접근 권한 설정

  • -

1. 사용자 계정 생성

 

1.1 내부 접속용 

create user 'RemoteUser'@'localhost' identified by 'localPassword';


1.2 모든IP 외부접속용

create user 'RemoteUser'@'%' identified by 'remotePassword';


1.3 특정IP 외부접속용

create user 'RemoteUser'@'192.168.150.%' identified by 'remotePassword';

 

2. 계정 생성 및  권한설정

 

2.1 내부 접속용

grant all privileges on DB_NAME.* to RemoteUser@'localhost';


2.2 모든IP 외부접속용

grant all privileges on DB_NAME.* to RemotUser@'%';


2.3 특정IP 외부접속용

grant all privileges on DB_NAME.* to RemoteUser@'192.168.150.%';
Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.