'Laravel SQLSTATE[HY000] [2002] Connection timed out

I get this error on php artisan migrate:

Illuminate\Database\QueryException

SQLSTATE[HY000] [2002] Connection timed out (SQL: select * from information_schema.tables where table_schema = epiz_30911531_femmost and table_name = migrations and table_type = 'BASE TABLE')

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
   
 +36 vendor frames 
  37  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

This is my .env

DB_CONNECTION=mysql
DB_HOST=sql309.epizy.com
DB_PORT=33060
DB_DATABASE=epiz_30911531_femmost
DB_USERNAME=epiz_30911531
DB_PASSWORD=***********

This is my database.php

'mysql' => [
    'driver' => 'mysql',
    'url' => env('DATABASE_URL'),
    'host' => env('DB_HOST', 'sql309.epizy.com'),
    'port' => env('DB_PORT', '33060'),
    'database' => env('DB_DATABASE', 'epiz_30911531_femmost'),
    'username' => env('DB_USERNAME', 'epiz_30911531'),
    'password' => env('DB_PASSWORD', '*********'),
    'unix_socket' => env('DB_SOCKET', '')
]


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source