노무현 전 대통령 서거 추모글 남기기

문제 파악


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 하니 됌


한편, \ \\ 로 바꾸니 되더란 얘긴 있는데, 난 안먹혔음

 

찾다보니, 이런 페이지가 있는데, if you're google user....

http://www.experts-exchange.com/Database/MySQL/Q_21696685.html

놀랍게도 한국어를 선택하니 번역 페이지가 나오네. databasezone.. 번역이 수상하긴 하지만;;


이 글은 스프링노트에서 작성되었습니다.