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