title: Laravel + Vagrant = Access denied for user 'root'@'localhost'
body: <p>I've seen that many users here on stackoverflow have a similar issue but following the answers I'm not able to make it work.</p>
  
  <p>When I run:</p>
  
  <pre><code>php artisan migrate
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>[PDOException]                                                                         
  SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO) 
  </code></pre>
  
  <p>This is my app/config/app.php</p>
  
  <pre><code>'mysql' =&gt; array(
              'driver'    =&gt; 'mysql',
              'host'      =&gt; 'localhost',
              'database'  =&gt; 'mio_sito',
              'username'  =&gt; 'root',
              'password'  =&gt; '',
              'charset'   =&gt; 'utf8',
              'collation' =&gt; 'utf8_unicode_ci',
              'prefix'    =&gt; '',
          ),
  </code></pre>
  
  <p>The problem is that I don't actually have a password, if I login to vagrant with:</p>
  
  <pre><code>vagrant ssh
  </code></pre>
  
  <p>I can access mysql with:</p>
  
  <pre><code>mysql -u root
  </code></pre>
  
  <p>and no password is required.<br>
  How can I fix this issue?</p>