title: QueryException SQLSTATE[HY000] [2002] Can't connect to MySQL server
body: <p>QueryException
  SQLSTATE[HY000] [2002] Can't connect to MySQL server on '127.0.0.1' (110)</p>
  
  <p>When I put this project into another server it works fine . 
  Is there any problem with server configuration ? </p>
  
  <p>in database.php</p>
  
  <pre><code>'default' =&gt; env('DB_CONNECTION', 'mysql'),
  
  
  
  'connections' =&gt; [
  
      'sqlite' =&gt; [
          'driver' =&gt; 'sqlite',
          'database' =&gt; env('DB_DATABASE', database_path('database.sqlite')),
          'prefix' =&gt; '',
      ],
  
      'mysql' =&gt; [
          'driver' =&gt; 'mysql',
          'host' =&gt; env('DB_HOST', '127.0.0.1'),
          'port' =&gt; env('DB_PORT', '3306'),
          'database' =&gt; 'projapati',
          'username' =&gt; 'projapati',
          'password' =&gt; 'AHt!j![(dl',
          'charset' =&gt; 'utf8mb4',
          'collation' =&gt; 'utf8mb4_unicode_ci',
          'prefix' =&gt; '',
          'strict' =&gt; false,
          'engine' =&gt; null,
      ],
  
      'pgsql' =&gt; [
          'driver' =&gt; 'pgsql',
          'host' =&gt; env('DB_HOST', '127.0.0.1'),
          'port' =&gt; env('DB_PORT', '5432'),
          'database' =&gt; env('DB_DATABASE', 'forge'),
          'username' =&gt; env('DB_USERNAME', 'forge'),
          'password' =&gt; env('DB_PASSWORD', ''),
          'charset' =&gt; 'utf8',
          'prefix' =&gt; '',
          'schema' =&gt; 'public',
          'sslmode' =&gt; 'prefer',
      ],
  
  ],
  </code></pre>
  
  <p>How can I solve this problem?</p>