title: Laravel can not connect mariaDB on CentOs 7.2
body: <p><a href="https://stackoverflow.com/questions/31650972/how-to-configure-mariadb-in-laravel-5">How to configure MariaDB in Laravel 5?</a></p>
  
  <p>The thread above mentioned that changing port 3306 to 3307,I tried it but still not work.    </p>
  
  <p>I write my code on local Windows,the port is also 3306, and the app can run, I copy the app to cloud host,OS is CentOs 7.2,the error appears.</p>
  
  <p>And I am using Laravel <code>5.3</code> and mariaDB <code>10.2</code>.</p>
  
  <p>The <code>.env</code> file is like this：</p>
  
  <pre><code>DB_USERNAME=root
  DB_PASSWORD=123456
  </code></pre>
  
  <p>config/database.php</p>
  
  <pre><code>'mysql' =&gt; [
      'driver' =&gt; 'mysql',
      'host' =&gt; env('DB_HOST', 'localhost'),
      'port' =&gt; env('DB_PORT', '3306'),
      'database' =&gt; env('DB_DATABASE', 'forge'),
      'username' =&gt; env('DB_USERNAME', 'forge'),
      'password' =&gt; env('DB_PASSWORD', ''),
      'charset' =&gt; 'utf8',
      'collation' =&gt; 'utf8_unicode_ci',
      'prefix' =&gt; '',
      'strict' =&gt; true,
      'engine' =&gt; null,
  ],
  </code></pre>
  
  <p>I can access it via terminal：</p>
  
  <pre><code># mysql -uroot -p123456;
  MariaDB [(none)]&gt; 
  </code></pre>
  
  <p>When running <code>php artisan migrate</code>，there is an error：</p>
  
  <pre><code>  [PDOException]                                                                         
    SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)
  </code></pre>
  
  <p>What should I do？</p>