title: mysqli_connect fail on localhost of IIS on Windows 7 when executing PHP from a local website
body: <p>I am a control systems engineer who is trying to learn MySQL and PHP for the first time.</p>
  
  <p>My Windows 7 Home Premium developmental computer has MS IIS server installed.  I've used Internet Information Services IIS Manager to create the small 1 page website on my computer in <code>C:\inetpub\wwwroot\mysite</code>.  The address when browsing the site, is http:\192.168.1.8.  </p>
  
  <p>MySQL Server 5.6 is installed in <code>C:\Program Files\MySQL\MySQL Server 5.6</code>. PHP 5.3 is installed in <code>C:\Program Files (x86)\PHP\V5.3</code>.  Phpmyadmin 4.0.4 is installed in <code>C:\inetpub\phpmyadmin</code>.  I am the only user of my computer and therefore I have administration rights.</p>
  
  <p>I successfully used <code>"http://localhost/Phpmyadmin"</code> to create the MySQL database and its first table.  It sees the database at 127 0 0 1.</p>
  
  <p>The following line in my php file, will return the error string (thats progress for me, because the browser doesn't just display the contents of the php file).</p>
  
  <pre><code>$dbc = mysqli_connect('http : // 127 0 0 1', 'mysqlusername', 'mysqlpassword', 'mydatabase')
  or die('Error connecting to MySQL server.');
  </code></pre>
  
  <p>The mysqlusername, mysqlpassword and mydatabase all work with http : // localhost/ phpmyadmin.  For the connection, I've tried: <code>http : // 127 0 0 1</code>, <code>http : // localhost</code>, and <code>http : // localhost/ 127 0 0 1</code>.  But I always get the error.</p>
  
  <p>A windows search, shows the database in 2 places: <code>C:\ProgramData\MySQL Server 5.6 
  Data\mydatabase</code> and at <code>localhost / 127 0 0 1/ mydatabase</code>.</p>
  
  <p>Can anyone please help me figure out what is wrong?  Perhaps there is a config file somewhere that needs a change?  Does anyone know if there is a simple guide out there that explains the basics (maybe a map) of how IIS, MySQL and PHP work together.</p>
  
  <p>In the above sentences, I put a bunch of spaces and I changed some periods into spaces so that I could post this question.</p>