title: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES)?
body: <p><a href="https://i.stack.imgur.com/4xjaM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4xjaM.png" alt="enter image description here"></a><strong>.env file</strong></p>
  
  <pre><code>DB_CONNECTION=mysql
  DB_HOST=127.0.0.1
  DB_PORT=3306
  DB_DATABASE=task
  DB_USERNAME=root
  DB_PASSWORD=******
  </code></pre>
  
  <p><em>List of all databases</em>
  <code>mysql&gt; show databases;
  +--------------------+
  | Database           |
  +--------------------+
  | information_schema |
  | mysql              |
  | nodeDB             |
  | performance_schema |
  | phpmyadmin         |
  | pythonDB           |
  | sys                |
  | task               |
  +--------------------+
  8 rows in set (0.13 sec)</code></p>
  
  <p><em>Already tried these solutions</em></p>
  
  <blockquote>
    <p><a href="https://stackoverflow.com/questions/42496917/sqlstatehy000-1045-access-denied-for-user-usernamelocalhost-using-pass">SQLSTATE[HY000] [1045] Access denied for user &#39;username&#39;@&#39;localhost&#39; (using password: YES)</a></p>
    
    <p><a href="https://stackoverflow.com/questions/17975120/access-denied-for-user-rootlocalhost-using-password-yes-no-privileges">Access Denied for User &#39;root&#39;@&#39;localhost&#39; (using password: YES) - No Privileges?</a></p>
  </blockquote>