mysql> use mysql;
Database changed
mysql> grant all privileges on dbname_or_astrisk.* to testid@localhost identified by '1234' with grant option;
//dbname_or_astrisk : DB 이름을 지정 하면 해당 DB만 접근가능, *은 모든 DB 접근 가능
//testid@localhost : testid에 추가할 계정명을, localhost에는 '%'를 넣으면 외부 접근 가능
mysql> flush privileges;
Query OK, 0 rows affected (0.09 sec)
이렇게 했는데 외부접근 안된다면 my.ini 파일의 설정중 아래 내용이 존재할 것이다. 주석 처리 하라.
bind-address=127.0.0.1
'프로그램 경험 > Database' 카테고리의 다른 글
[MySql] AUTO_INCREMENT 변수 초기화 하기 (0) | 2012.12.11 |
---|---|
[Databases] 기존 테이블 데이터로 신규 테이블 생성(테이블 복사) (0) | 2012.11.28 |
[MySql] mysql 백업 및 복원 (0) | 2012.11.27 |
[SqlServer] 테이블에 컬럼 추가 및 수정 (0) | 2012.11.15 |
[SqlServer] 각 테이블별 행 개수 집계 (0) | 2012.11.14 |