****제가 아는 후배한테 한 질문입니다. 혹 아시는 분 꼭 좀 갈켜주세요...
사실 안 가르쳐 주셔도 포기는 안 합니다.!! 포기는 죽느니만 못하니까요 ^^ 꼭 좀 알려주세요....
***
방학 내 잘 지내고 있냐?? 음냐음냐...
엉아도 이젠 방학이니 어리버리 안 하고 좀 제대로 뭔가를 해 볼려고 노력하고 있는디 잘 안되네..
이젠 APM 내가 설치해서 쓰는 거 잠시 접었다.
php4.0함 써 볼려고 좀 노력했는데.. 헉!!!
그냥 우선 3쓰고...
mysql이 잘 안 된다...
한 번 살펴보고 가려운... 아니 무진장 아픈 곳 좀 고쳐주라.
mysql설치하고 ./bin/mysql_install_db실행해서 디비 설치했거든...
그리고 ./bin/safe_mysqld & 해서 백그라운드로 디비데몬 실행해서
ps -ef | grep mysql하니까
데몬이 뜬 게 보이더라구...
root 824 790 0 05:01 tty1 00:00:00 sh ./bin/safe_mysqld
root 835 824 0 05:01 tty1 00:00:00 /usr/sbin/mysqld --basedir=/ --d
root 837 835 0 05:01 tty1 00:00:00 /usr/sbin/mysqld --basedir=/ --d
root 838 837 0 05:01 tty1 00:00:00 /usr/sbin/mysqld --basedir=/ --d
root 907 902 0 05:19 pts/0 00:00:00 grep mysql
밑에 것은 내가 실행한 php화일이구...
<html>
<?
mysql_connect("localhost","urstory","");
mysql_select_db("countdb");
$result=mysql_query("SELECT view_count FROM homecount where hostname='homepage' ");
if(mysql_num_rows($result)) {
$view=mysql_result($result,0,"view_count")+1;
mysql_query("UPDATE homecount set view_count=$view where hostname='homepage' ");
echo "$view번째 손님입니다요.";
}else
{
echo "Table안에 해당 record가 없습니다. ";
}
?>
</html>
사용자접근 카운터 예제인데....
브라우저로 실행시키면 에러가 이렇게 난다.
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/httpd/html/testmysql.php3 on line 3
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/httpd/html/testmysql.php3 on line 4
Warning: MySQL: A link to the server could not be established in /home/httpd/html/testmysql.php3 on line 4
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /home/httpd/html/testmysql.php3 on line 5
Warning: -1 is not a MySQL link index in /home/httpd/html/testmysql.php3 on line 5
Warning: 0 is not a MySQL result index in /home/httpd/html/testmysql.php3 on line 6
Table안에 해당 record가 없습니다.
데이터베이스 데몬 기동시키면 /tmp디렉토리에 mysql.sock이라는 소켓이 보인다는데 난 안보이거든...
그래서 그런가?
그래서 넘들이 얘기 하는 데로 리부팅해서 다시 데몬 띄우고 해도 이렇게 에러가 난다.
디비로 접근할 수 없다는 얘기 같은데... 접근 권한이 없어서인가??? 참고로 디비 실행해서 보면 다 되는데...
mysql접근해서 하는 작업은 다 되거든...
설명이 미흡한가??
보고 좀 갈켜주라... 흑흑
http://210.100l.211.253/testmysql.php3
|