title: How can I access PDO in MAMP?
body: <p>I'm setting up a PDO connection in a test script:</p>
  
  <p>
  
  <pre><code>use app\SomeDAO;
  
  class SomeTest extends \PHPUnit_Framework_TestCase
  {
      protected $db;
  
      public function setUp()
      {
          $dsn = "mysql:host=localhost;dbname=baseball;user=root;password=root";
          $this-&gt;db = new PDO($dsn);
      }
  </code></pre>
  
  <p>I'm getting an error:</p>
  
  <blockquote>
    <p>PDOException: SQLSTATE[HY000] [2002] No such file or directory. </p>
  </blockquote>
  
  <p>How can I use PDO here?</p>