Hello, Freinds! I'm new to MySQL.
Anyway... My O/S is FreeBSD 4.6. In /etc/hosts there are only two line. 127.0.0.1 localhost localhost.paldal.com 192.168.0.88 unix.paldal.com unix And in /etc/host.conf, first seek : /etc/hosts second seek : bind And some PHP codes are below: -------------------------------------------------------------------------------- ---------------------------------- <HTML> <P align=center> ÀÌö¿ìÀÇ °¡Á·</P> <?php $connection = mysql_connect("localhost.paldal.com", "mysqladm", "mysql1") or die("Couldn't connect to server."); $db = mysql_select_db("test", $connection) or die("Couldn't select database."); -------------------------------------------------------------------------------- ---------------------------------- But the forth line of th the PHP codes results: -. $connection = mysql_connect("unix", "mysqladm", "mysql1") or die("Couldn't connect to server."); --> OK -. $connection = mysql_connect("unix.paldal.com", "mysqladm", "mysql1") or die("Couldn't connect to server."); --> OK -. $connection = mysql_connect("localhost.paldal.com", "mysqladm", "mysql1") or die("Couldn't connect to server."); --> OK -. $connection = mysql_connect("localhost", "mysqladm", "mysql1") or die("Couldn't connect to server."); --> Warning: Can't connect to local MySQL server through socket '/usr/local/mysql/var/mysql.sock' (13) in /usr/home/lee/htdocs/index.php on line 4 Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/usr/local/mysql/var/mysql.sock' (13) in /usr/home/lee/htdocs/index.php on line 4 Couldn't connect to server. For me, the Last is a mystery! Please help me! Thanks. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php