title: mysql_select_db failure
body: <p>I am using phpMyAdmin + MySQL.</p>
  
  <p>I created a database and am now trying to make the connection in a PHP script. The curious thing is that connecting to the DB works, so I get the "Connected to MySQL server" message,  but I when it comes to selecting the 'petfood' database, the script shows "DIED at selection".</p>
  
  <p>Any idea why? Thanks, and here's my piece of code:</p>
  
  <pre><code>&lt;?php
  
  $user = 'localhost';
  $pass = 'password';
  $db_name = 'petfood';
  
  $db_conn = new mysqli("localhost", $user, $pass, $db_name) or die("Cannot connect to DB");
  echo "Connected to MySQL server";
  mysql_select_db($db_name) or die("DIED at selection");
  echo "Database Selected";
  
  ?&gt;
  </code></pre>