System/OS
2013.04.25 13:24
Mac OS X - Apache+PHP+MySQL 환경 서버
조회 수 31625 댓글 0
php에서 mysql_real_escape_string( $_GET['iDisplayStart'] ) 와 같은 구문을 사용했더니,
mysql_real_escape_string(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock)
위와 같은 오류가 발생한다.
쉽게 생각해서. mysql.sock 파일을 찾지 못한것 같아서 mysql.sock 파일을 심볼릭 링크를 생성했다.
sh-3.2# find / -name mysql.sock
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
/private/tmp/mysql.sock
sh-3.2# cd /var
sh-3.2# mkdir mysql
sh-3.2# chown _mysql:_mysql mysql
sh-3.2# cd mysql
sh-3.2# ln -s /private/tmp/mysql.sock /var/mysql/mysql.sock
[오류메시지]
Warning: mysql_real_escape_string(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /Library/Server/Web/Data/Sites/Default/mgr/ajax.question.php on line 33
Warning: mysql_real_escape_string(): No such file or directory in /Library/Server/Web/Data/Sites/Default/mgr/ajax.question.php on line 33
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
166 | System/OS | [linux] sendmail 설정/사용 | hooni | 2003.04.23 | 14570 |
165 | System/OS | [linux] DNS(Domain Name System) 설치, 설정 | hooni | 2003.04.23 | 12438 |
164 | System/OS | [linux] Masquerade 가상 ip분할기법 | hooni | 2003.04.23 | 47936 |
163 | System/OS | [linux] DHCP(Dynamic Host Configuration Protocol) 서버 | hooni | 2003.04.23 | 13023 |
162 | System/OS | [linux] 네트웍 트래픽 모니터링(MRTG) | hooni | 2003.04.23 | 41659 |
161 | System/OS | [linux] 커널 컴파일, 설정 | hooni | 2003.04.23 | 17845 |
160 | System/OS | [linux] 네트워크 커널 설정.. | hooni | 2003.04.23 | 16468 |
159 | System/OS | [linux] 최소한의 커널 설정(커널설치 전체과정) | hooni | 2003.04.23 | 17383 |
158 | System/OS | [linux] Xwindow/Xmanager 사용 | hooni | 2003.04.23 | 13326 |
157 | System/OS | [linux] ipchains 옵션 | hooni | 2003.04.23 | 13605 |
156 | System/OS | [linux] ipchains 사용예(패킷 필터링) | hooni | 2003.04.23 | 14165 |
155 | System/OS | [linux] ipfwadm를 이용한 패킷필터링(구버전) | hooni | 2003.04.23 | 13009 |