문제 파악
mysql> select * into outfile '/tmp/test.dat' from test;
이 명령어, 환경에 따라 안먹히는걸까?
Fedora Core release 3(Heidelberg) / mysql 4.1.22 에서는 OK 되었고,
Fedora Core release 4 (Stentz) /mysql 4.1.20 에서는 다음과 같은 에러가 떴다.
ERROR 1 (HY000): Can't create/write '/tmp/test.dat' to file (Errcode: 13)
http://bugs.mysql.com/bug.php?id=19557 여기보면..
chmod 777 디렉토리명 해도 안된다는 문젠데,
난 이렇게 하니까 되네. :-)
mysql> select * into outfile '/tmp/test.bak' from help;
ERROR 1 (HY000): Can't create/write to file '/tmp/test.bak' (Errcode: 13) <- 안되다가
mysql> select * into outfile '/tmp/test.bak' from help;
Query OK, 367 rows affected (0.00 sec) <- chmod 777 /tmp 하니 됌
ERROR 1 (HY000): Can't create/write to file '/tmp/test.bak' (Errcode: 13) <- 안되다가
mysql> select * into outfile '/tmp/test.bak' from help;
Query OK, 367 rows affected (0.00 sec) <- chmod 777 /tmp 하니 됌
한편, \를 \\ 로 바꾸니 되더란 얘긴 있는데, 난 안먹혔음
찾다보니, 이런 페이지가 있는데, if you're google user....
http://www.experts-exchange.com/Database/MySQL/Q_21696685.html
놀랍게도 한국어를 선택하니 번역 페이지가 나오네. databasezone.. 번역이 수상하긴 하지만;;
이 글은 스프링노트에서 작성되었습니다.
'개발자가 뭐길래' 카테고리의 다른 글
KLDP 11주년 기념 KLDPConf (3) | 2007.11.14 |
---|---|
MS 데브데이 - 여자개발자 모임터 커뮤니티 참가 (0) | 2007.11.06 |
MySQL UNIQUE (0) | 2007.10.15 |
553 sorry, that domain isn't in my list of allowed rcpt hosts (2) | 2007.10.11 |
index 효과 테스트 (0) | 2007.10.05 |