Hi Sebastian,

That was it alright. I commented out the socket lines from mysql.ini (restarted it) and changed my php command to:

$mysqli = new mysqli(".", $username,$password, $database);

and all seems to be working fine now.

Thanks again for your help, much appreciated.

Regards,
 John


Sebastian Mendel wrote:
John Comerford schrieb:
Hi Sebastian,

I did read somewhere that sockets was not valid for windows, and '/tmp/mysql.sock' doesn't resolve to anything on my machine. But I have
tried the following commands:

$mysqli = new mysqli(".", $username,$password, $database);
or
$mysqli = new mysqli(".", $username,$password, $database,null);

and I get the following error:

Can't open named pipe to host: . pipe: MySQL (2)

yes, 'MySQL' is default name of the pipe, used by the libaray


but when I include the "/tmp/mysql.sock" parameter it works fine.  I was
thinking that maybe I have things configured in such a way that MySQL is
using "/tmp/mysql.sock" as the pipe name.  I am going to do some testing
this evening to see if my suspicion is correct.

yes:

Note: you can specify a pipe name on the advanced network page, if required.


possible this is et with the soccket paramter in my.cnf

[mysqld]
#port        = 3306
socket = /tmp/mysql.sock




--

1^st Floor, 184 -186 Glenferrie Road, Malvern VIC 3144

PH:    *(03) 9500 1466*
FX :    *(03) 9500 1469*
Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Web:  www.styleman.com.au <http://www.styleman.com.au>

The information in this e-mail is confidential and is intended solely for the addressee. Any views or opinions presented are solely those of the author and do not necessarily represent those of Option Systems Pty Ltd. If you are not the intended recipient, please delete this message and contact the sender.

Reply via email to