On Tue, 1 Jun 2010, What you get is Not what you see wrote: > Freshly installed on openbsd 4.6 mysql,php and php5-mysql packages. > Done the configs. Now php and mysql works. But I couldnt make it > connect to mysql from within php with such a command > mysql_connect("localhost","user","pass") > It used to give "Cant connect to mysql through socket error" till I > change the command to > mysql_connect(127.0.0.1,"user","pass") > I want to learn why? > Because the socket is in /var, .. and default apache chroot's to /var/www. I believe there are tricks to make it work, but it's simpler to just connect @127.0.0.1.
Lee