MYSQL 외부접속허용
DB CAFE
thumb_up 추천메뉴 바로가기
- DBA { Oracle DBA 명령어 > DBA 초급 과정 > DBA 고급 과정 }
- 튜닝 { 오라클 튜닝 목록 }
- 모델링 { 데이터 모델링 가이드 }
1 1.root권한 으로 접속[편집]
mysql> use mysql;
mysql> select host, user, password from user;
2 2.권한 설정 하기[편집]
1) 특정 IP 접근 허용 설정
mysql> grant all privileges on *.* to 'root'@'192.168.56.101' identified by '패스워드'’;
2) 특정 IP 대역 접근 허용 설정
mysql> grant all privileges on *.* to 'root'@'192.168.%' identified by 'root의 패스워드';
3) 모든 IP의 접근 허용 설정
mysql> grant all privileges on *.* to 'root'@'%' identified by 'root의 패스워드';
3 3.변경사항 적용[편집]
mysql> flush privileges;
5 5. mysql 재시작[편집]
/etc/init.d/mysqld restart