Problems connecting to MySQL database from PHP application using shared memory

Saturday, July 5, 2014

I have a very basic PHP page from which I am connecting to a MySQL database with success.


My MySQL ini file is as follows:


skip-show-database

local-infile=0

bind-address=::1


I am now reading that connecting via shared memory is faster and more secure so I decided to give it a go by changing my ini file as follows:


skip-show-database

local-infile=0

skip-networking

enable-named-pipe

shared-memory

bind-address=::1


With these settings, I can access the database from DOS with the mysql.exe command without any issues but if I try to reload my PHP page, I get this error:


No connection could be made because the target machine actively refused it.


I am connecting to the database with: $con=mysqli_connect("localhost","serveradmin","XXXXXXXXXXXXXXXXXX","mysql");


What am I missing? I noticed that with TCP/IP the database port was 3306 but with shared memory it's 0. Could this be it?


Thank you.







http://ift.tt/1xvb9so