title: Problems connecting to MySQL database from PHP application using shared memory
body: <p>I have a very basic PHP page from which I am connecting to a MySQL database.</p>
  
  <p>My MySQL <em>.ini</em> file is as follows:</p>
  
  <pre><code>skip-show-database
  local-infile=0
  bind-address=::1
  </code></pre>
  
  <p>I am now reading that connecting via shared memory is faster and more secure so I changed my <em>.ini</em> file to this:</p>
  
  <pre><code>skip-show-database
  local-infile=0
  skip-networking
  enable-named-pipe
  shared-memory
  bind-address=::1
  </code></pre>
  
  <p>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:</p>
  
  <p>No connection could be made because the target machine actively refused it.</p>
  
  <p>I am connecting to the database with:</p>
  
  <pre><code>$con=mysqli_connect("localhost", "serveradmin", "XXXXXXXXXXXXXXXXXX", "mysql");
  </code></pre>
  
  <p>I noticed that with <em>TCP/IP</em> the database port was <strong>3306</strong> but with shared memory it's <strong>0</strong>.</p>
  
  <p>What am I missing? Could this be it?</p>