title: PHP Artisan Migrate Error in Lamp Environment
body: <p>I am on MAC, my XAMPP is of XAMPP-VM,and creates a folder with lampp.</p>
  <p>In my XAMPP, my server is:localhost:8080</p>
  <p>I have an error, which says</p>
  <blockquote>
  <p>Illuminate\Database\QueryException]
  SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = laravel  and table_name = migrations)</p>
  </blockquote>
  <p>I have tried out many solutions,but none worked for me.</p>
  <p>I am not sure about the 'DB_SOCKET' like what it is and where the path for the file exist in the XAMPP.</p>
  <p><strong>.env</strong></p>
  <pre><code>    APP_NAME=Laravel
      APP_ENV=local
      APP_KEY=base64:zS3EUWDenTnhNu0CpN1TQdVSM0ArEgtFI1zpIwes1qQ=
      APP_DEBUG=true
      APP_URL=http://localhost
  
      LOG_CHANNEL=stack
  
      DB_CONNECTION=mysql
      DB_HOST=localhost
      DB_PORT=3306
      DB_DATABASE=demo
      DB_USERNAME=root
      DB_PASSWORD=
      DB_SOCKET=/Applications/lampp/tmp/mysql/mysql.sock
  
      BROADCAST_DRIVER=log
      CACHE_DRIVER=file
      QUEUE_CONNECTION=sync
      SESSION_DRIVER=file
      SESSION_LIFETIME=120
      REDIS_HOST=127.0.0.1
      REDIS_PASSWORD=null
      REDIS_PORT=6379
  
      MAIL_MAILER=smtp
      MAIL_HOST=smtp.mailtrap.io
      MAIL_PORT=2525
      MAIL_USERNAME=null
      MAIL_PASSWORD=null
      MAIL_ENCRYPTION=null
      MAIL_FROM_ADDRESS=null
      MAIL_FROM_NAME=&quot;${APP_NAME}&quot;
  
      AWS_ACCESS_KEY_ID=
      AWS_SECRET_ACCESS_KEY=
      AWS_DEFAULT_REGION=us-east-1
      AWS_BUCKET=
  
      PUSHER_APP_ID=
      PUSHER_APP_KEY=
      PUSHER_APP_SECRET=
      PUSHER_APP_CLUSTER=mt1
  
      MIX_PUSHER_APP_KEY=&quot;${PUSHER_APP_KEY}&quot;
      MIX_PUSHER_APP_CLUSTER=&quot;${PUSHER_APP_CLUSTER}&quot;
  </code></pre>
  <p>database.php</p>
  <pre><code>'mysql' =&gt; [
              'driver' =&gt; 'mysql',
              'url' =&gt; env('DATABASE_URL'),
              'host' =&gt; env('DB_HOST', '127.0.0.1'),
              'port' =&gt; env('DB_PORT', '3306'),
              'database' =&gt; env('DB_DATABASE', 'forge'),
              'username' =&gt; env('DB_USERNAME', 'forge'),
              'password' =&gt; env('DB_PASSWORD', ''),
              'unix_socket' =&gt; env('DB_SOCKET', ''),
              'charset' =&gt; 'utf8mb4',
              'collation' =&gt; 'utf8mb4_unicode_ci',
              'prefix' =&gt; '',
              'prefix_indexes' =&gt; true,
              'strict' =&gt; false,
              'engine' =&gt; null,
              'options' =&gt; extension_loaded('pdo_mysql') ? array_filter([
                  PDO::MYSQL_ATTR_SSL_CA =&gt; env('MYSQL_ATTR_SSL_CA'),
              ]) : [],
          ],
  </code></pre>