title: Laravel 5.4 access denied for user root@localhost on migrate
body: <p>I have a stange one with Laravel. I have a bad habit of creating projects on virtual box with laravel project for testing. (debian last stable currently 9.1, nginx, php7.1, MariaDB).</p>
  
  <p>Before you tell me to go read another post somewhere, please read everything, I mays have missed the post but I tried quite à lot I tried most of the solution that may have worked for others, but they don't in my case (thanks). </p>
  
  <p>I tried different thing and always end breaking everything and doing hover (that's normal...).</p>
  
  <p>I have already tried a number of installation and never had any problem with </p>
  
  <pre><code>php artisan migrate
  </code></pre>
  
  <p>That is until today. I prepared my migrations files and tried the migrate and I got this message :</p>
  
  <pre><code>[Illuminate\Database\QueryException]
    SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' (SQL: sele
    ct * from information_schema.tables where table_schema = test and table_nam
    e = migrations)
  </code></pre>
  
  <p>And this one:</p>
  
  <pre><code>[PDOException]
    SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'
  </code></pre>
  
  <p>I did everything as always, I checked my credentials that are in the .env file and tested them. No problem there.</p>
  
  <pre><code>DB_CONNECTION=mysql
  DB_HOST=127.0.0.1
  DB_PORT=3306
  DB_DATABASE=test
  DB_USERNAME=root
  DB_PASSWORD=Password2
  </code></pre>
  
  <p>The database does exist, can't be wrong with this name :</p>
  
  <pre><code>SHOW DATABASEs;
  +--------------------+
  | Database           |
  +--------------------+
  | information_schema |
  | mysql              |
  | performance_schema |
  | test               |
  +--------------------+
  </code></pre>
  
  <p>When looking for code error 1698 in MariaDB, they tell me that this code appear when it's trying to connect without password.</p>
  
  <p>So my question is why is it doing this? I tried with a new project, just installed and doing the artisan command line, it changes nothing.</p>
  
  <p>I would like to avoid doing a fresh os install.</p>
  
  <p>Thanks in advance for your help and sorry for my poor english.</p>