title: problem with php artisan migrate while deploying laravel app to heroku
body: <p>I was deploying my laravel app to heroku. Everything was going fine, but when I had to migrate my database (which is on phpmyadmin) I am getting the following error on executing the command php artisan migrate.</p>
  
  <pre><code>[Illuminate\Database\QueryException]
    SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema =
     database_lms and table_name = migrations)
  
  
  
    [Doctrine\DBAL\Driver\PDOException]
    SQLSTATE[HY000] [2002] No such file or directory
  
  
  
    [PDOException]
    SQLSTATE[HY000] [2002] No such file or directory
  </code></pre>
  
  <p>I have a database called database_lms within which I have the migrations table.
  This is my .env file</p>
  
  <pre><code>    DB_CONNECTION=mysql
      DB_HOST=localhost
      DB_PORT=3306
      DB_DATABASE=database_lms
      DB_USERNAME=root
      DB_PASSWORD=
  </code></pre>
  
  <p>and here is my config/database.php file containing the mysql parameters</p>
  
  <pre><code>'mysql' =&gt; [
              'driver' =&gt; 'mysql',
              'host' =&gt; env('DB_HOST', '127.0.0.1'),
              'port' =&gt; env('DB_PORT', '3306'),
              'database' =&gt; env('DB_DATABASE', 'database_lms'),
              'username' =&gt; env('DB_USERNAME', 'root'),
              'password' =&gt; env('DB_PASSWORD', ''),
              'unix_socket' =&gt; env('DB_SOCKET', ''),
              'charset' =&gt; 'utf8mb4',
              'collation' =&gt; 'utf8mb4_unicode_ci',
              'prefix' =&gt; '',
              'strict' =&gt; true,
              'engine' =&gt; null,
          ],
  </code></pre>
  
  <p>I have tried changing DB_HOST to 127.0.0.1, but this also isn't working.
  I have also run php artisan config:cache, and then run php artisan migrate but have got the same error. Any ideas on how to solve this?</p>