title: Artisan cannot connect to mysql
body: <p>I am running a local MAMP machine on my Mac.  Laravel running in production environment. Laravel is able to access the MySQL DB on php pages I display through the browser, yet when I am running <code>php artisan migrate</code> in Terminal, I receive</p>
  
  <pre><code>[PDOException]                                                                          
    SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
  </code></pre>
  
  <p><code>app/config/database</code>:</p>
  
  <pre><code>'mysql' =&gt; array(
      'driver'    =&gt; 'mysql',
      'host'      =&gt; 'localhost',
      'database'  =&gt; 'laravel1',
      'username'  =&gt; 'root',
      'password'  =&gt; 'root',
      'charset'   =&gt; 'utf8',
      'collation' =&gt; 'utf8_unicode_ci',
      'prefix'    =&gt; '',
      'port'      =&gt; '8889'
  ),
  </code></pre>
  
  <p>ATTEMPTED SOLUTION:</p>
  
  <p>Adding <code>'unix_socket' =&gt; '/Applications/MAMP/tmp/mysql/mysql.sock'</code> (path designated in <code>/Applications/MAMP/bin/startMysql.sh</code>) to <code>app/config/database</code>.</p>
  
  <p>Results in error:</p>
  
  <pre><code>[PDOException]                                    
    SQLSTATE[HY000] [2002] No such file or directory 
  </code></pre>
  
  <p>Help appreciated.</p>