problems with mysqli extension

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!
I've can't get php to communicate through mysql via the unix socket.
I've compiled apache-2.0.55, mysql-5.0.18 and php-5.1.2. I've configured mysql to put the unix socket in the /var/run/mysql/mysql.sock file.

Among the compilation options that I passed to php, there are "--with-mysqli=shared,/usr" and "--with-mysql-sock=/var/run/mysql/mysql.sock".

I've started the mysql and httpd daemons.
To test the connection to mysql I've used the following php script:

[code]
<?php
$mysqli = new mysqli("localhost", "myuser", "mypass", "world");
if (mysqli_connect_errno()) {
   printf("Connect failed: %s<br>", mysqli_connect_errno());
   exit();
}
printf("Host information: %s<br>", $mysqli->host_info);
$mysqli->close();
?>
[/code]

All I get is "Connect failed: can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (13)".... but the socket file is there!!!!!

I'm in desperate need of help.
Thanks

Filippo

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux