※ root 계정을 외부에서 접속 가능하게 하기 보다는, 외부 접속이 가능한 별도의 계정을 만드는 것이 좋다.
1. MySQL 접속 후, mysql database 선택
mysql> use mysql;
2. user 테이블 살펴보기
mysql> select host, user, password from user;
root 의 host 값들은 localhost, 127.0.0.1 등으로 기본 등록되어 있지만, 외부접속을 나타내는 값이 없다.
host 를 특정 아이피를 지정하면 해당 아이피에서만 접속 가능하다.
host 를 % 기호로 설정하면 외부 어디에서든 접속이 가능하다.
3. 권한 설정
mysql> grant all privileges on *.* to '사용자 계정'@'%' identified by '사용자 계정의 패스워드';
4. 등록확인하기
mysql> select host, user, password from user;
사용자 계정의 host 필드에 % 가 등록되었는지 확인한다.
5. refresh
mysql> flush privileges;
위 단계는 my.cnf 파일 수정후 서버를 재시작할 것이기 때문에 굳이 안해도 된다.
6. my.cnf 에서 외부접속 관련사항 변경하기
user@home:~$ sudo vim /etc/mysql/my.cnf
파일 내용중
bind-address = 127.0.0.1
부분 주석처리후 저장하기
7. mysql 재시작
user@home:~$ sudo /etc/init.d/mysql restart
8. 완료.
이제 외부 클라이언트 프로그램에서 접속이 가능하다 ^^
※ 6번과 7번은 Unix/Linux에 해당. 윈도우는 바로 서비스 재시작하면 된다.
| font-family |
|
| font-size |
|
| font-style |
|
| font-variant |
|
| font-weight |
|
| letter-spacing |
|
| line-height |
|
| text-decoration |
|
| text-align |
|
| text-indent |
|
| text-transform |
|
| white-space |
|
| word-spacing |
|
| color |
|
| bg-attachment |
|
| bg-color |
|
| bg-image |
|
| bg-position |
|
| bg-repeat |
|
| width |
|
| height |
|
| border-top |
|
| border-right |
|
| border-bottom |
|
| border-left |
|
| margin |
|
| padding |
|
| max-height |
|
| min-height |
|
| max-width |
|
| min-width |
|
| outline-color |
|
| outline-style |
|
| outline-width |
|
| position |
|
| top |
|
| bottom |
|
| right |
|
| left |
|
| float |
|
| display |
|
| clear |
|
| z-index |
|
| list-style-image |
|
| list-style-type |
|
| list-style-position |
|
| vertical-align |
|
| border-collapse |
|
| border-spacing |
|
| caption-side |
|
| empty-cells |
|
| table-layout |
|
| text-shadow |
|
| -webkit-box-shadow |
|
| border-radius |
|
| overflow |
|
| cursor |
|
| visibility |
|
| font-family |
|
| font-size |
|
| font-style |
|
| font-variant |
|
| font-weight |
|
| letter-spacing |
|
| line-height |
|
| text-decoration |
|
| text-align |
|
| text-indent |
|
| text-transform |
|
| white-space |
|
| word-spacing |
|
| color |
|
| bg-attachment |
|
| bg-color |
|
| bg-image |
|
| bg-position |
|
| bg-repeat |
|
| width |
|
| height |
|
| border-top |
|
| border-right |
|
| border-bottom |
|
| border-left |
|
| margin |
|
| padding |
|
| max-height |
|
| min-height |
|
| max-width |
|
| min-width |
|
| outline-color |
|
| outline-style |
|
| outline-width |
|
| position |
|
| top |
|
| bottom |
|
| right |
|
| left |
|
| float |
|
| display |
|
| clear |
|
| z-index |
|
| list-style-image |
|
| list-style-type |
|
| list-style-position |
|
| vertical-align |
|
| border-collapse |
|
| border-spacing |
|
| caption-side |
|
| empty-cells |
|
| table-layout |
|
| text-shadow |
|
| -webkit-box-shadow |
|
| border-radius |
|
| overflow |
|
| cursor |
|
| visibility |
|