title: PHP - Cannot connect to MySQL database
body: <p>I am trying to connect to my MySQL database through php, I am managing my Database with phpmyadmin. To login the username is root and I dont have a password. My problem is I cant connect, I get the "Could not connect to mySQL database" message when I try to</p>
  
  <p>Below is my Code</p>
  
  <pre><code> &lt;?php
  
   session_start();
  
   $server = 'localhost';
   $db_usernmae = 'root';
   $db_password = '';
  $database = 'househockey';
  
  
   if(mysql_connect($server, $db_usernmae, $db_password)){
  die('Could not connect to mySQL database');
  }
  
   if (mysql_select_db($database)) {
  # code...
  die('couldnt connect to database');
  }
  
  ?&gt;
  </code></pre>
  
  <p>Im not sure if it matters, but I am using WAMP and I put my phpmyadmin folder into my htdocs folder.</p>
  
  <p>Thanks</p>