First, make sure that you are allowing network access to MySQL in MAMP
Then, t
'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock',
Your MySQL array should now look like this:
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8mb4',
'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],
You should now be able to run php artisan migrate with no problems!