title: Cannot connect to MYSQL in MAMP using PHP
body: <p>I just installed MAMP and have created a MYSQL database. I can access it via PHPMYADMIN.</p>
  
  <p>In my php page I have this, pasted directly from the MAMP webstart page--</p>
  
  <pre><code>$user = 'root';
  $password = 'root';
  $db = 'local_db';
  $host = 'localhost';
  $port = 3306;
  
  $link = mysql_connect(
     "$host:$port", 
     $user, 
     $password
  );
  $db_selected = mysql_select_db(
     $db, 
     $link
  );
  </code></pre>
  
  <p>The resulting page stops at this point, won't print anything below these instructions. </p>
  
  <p>I've tried changing the port in the MAMP preferences. I also included or die("Could not connect"); after the first line, but still don't get any text after the link data in the page.</p>
  
  <p>I checked online, and others with the problem at least see the die text. I don't get that. </p>
  
  <p>I haven't changed any passwords or data other than mess with the port number.</p>
  
  <p>Any help would be appreciated!</p>