웹마스터 블로그

MySQL 원격접속을 위한 권한 설정방법

REMOTE에서 Mysql에 접속하려면 데이타베이스 테이블 유저 그리고 접속 ip, 도메인에 대한 권한을 설정해야 한다.

 

데이타 베이스를 지정하여 권한을 설정하는경우:

grant all privileges on mydb.* to myuser@'%' identified by 'mypasswd';

 

데이타 베이스를 지정하며, 로컬 호스트에서만 접속할수 있는 권한 설정:

grant all privileges on mydb.* to myuser@localhost identified by 'mypasswd';

 

데이타 베이스를 지정하며, 지정된 사이트에서만 접속할수 있는 권한 설정:

grant all privileges on mydb.* to myuser@'%.domain.com' identified by 'mypasswd';

 

데이타 베이스를 지정하며, IP주소 범위에 있는 경우에만 접속할수 있는 권한 설정:

grant all privileges on mydb.* to myuser@'128.155.100.%' identified by 'mypasswd';

Related Posts:

comments powered by Disqus