title: PHP Laravel : Access denied for user 'homestead'@'localhost' (using password: YES)
body: <p>Can someone explain why I got this error and how to solve this? I read several same stackoverflow question but still doesn't work.</p>
  
  <pre><code> PDOException in Connector.php line 119:
   SQLSTATE[HY000] [1045] 
   Access denied for user 'homestead'@'localhost' (using password: YES)
  </code></pre>
  
  <p>My .env file</p>
  
  <pre><code>APP_ENV=local
  APP_KEY=base64:pAoq6D+Xq2VXHQ9/z1f2ecd5gD104FfBnp5w/UVTV0Q=
  APP_DEBUG=true
  APP_LOG_LEVEL=debug
  APP_URL=http://localhost
  
  DB_CONNECTION=mysql
  DB_HOST=localhost
  DB_PORT=3306
  DB_DATABASE=homestead
  DB_USERNAME=homestead
  DB_PASSWORD=secret
  
  BROADCAST_DRIVER=log
  CACHE_DRIVER=file
  SESSION_DRIVER=file
  QUEUE_DRIVER=sync
  
  REDIS_HOST=127.0.0.1
  REDIS_PASSWORD=null
  REDIS_PORT=6379
  
  MAIL_DRIVER=smtp
  MAIL_HOST=mailtrap.io
  MAIL_PORT=2525
  MAIL_USERNAME=null
  MAIL_PASSWORD=null
  MAIL_ENCRYPTION=null
  
  PUSHER_APP_ID=
  PUSHER_KEY=
  PUSHER_SECRET=
  </code></pre>
  
  <p>Thank you for your attention.</p>
  
  <p>Link I've read :</p>
  
  <p><a href="https://stackoverflow.com/questions/38860109/sqlstate28000-1045-access-denied-for-user-homesteadlocalhost-using-pas">SQLSTATE[28000] [1045] Access denied for user &#39;homestead&#39;@&#39;localhost&#39; (using password: YES)</a></p>
  
  <p><a href="https://stackoverflow.com/questions/44469647/queryexception-sqlstatehy000-1045-access-denied-for-user-homesteadlocalh">QueryException SQLSTATE[HY000] [1045] Access denied for user &#39;homestead&#39;@&#39;localhost&#39; (using password: YES)</a></p>
  
  <p><a href="https://stackoverflow.com/questions/28644344/access-denied-for-user-homesteadlocalhost-in-laravel-5">Access denied for user &#39;homestead@localhost&#39; .. in laravel 5</a></p>