I am runing RH 7 Mysql (installed of RPM), Apache (compiled version) and PHP
configure command './configure' '--with-xml'
'--with-apache=../apache_1.3.19' '--enable-shared-pdflib'

I am trying to connect to a mysql database using the following:

echo "Php is starting here<br>";
$host = "localhost";
$user = "root";
$password = "password here";
$database = "webgen";
echo "trying to connect to $host as $user<br>";
$db = mysql_connect($host,$user,$password) or
        die ("Connection could not be established<br>");
echo "Connected<br>";
echo "End of PHp.<br>";

and I am getting the following error

Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (111) in
/home/webgen/public_html/index3.php on line 10

I have tried to recompile PHP using --with-mysql but it wont compile even if
I specify the mysql location. It claims it cant find mysql.h

runnig locate mysql.h brings back nothing.

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to