1

I'm using a php7.4 and I get this error whenever I try any of the artisan code error image.

Here's my config/database.php

'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', ''),
        'unix_socket' => env('DB_SOCKET', ''),
        'charset' => env('DB_CHARSET', 'utf8mb4'),
        'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
        'prefix' => '',
        'strict' => false,
        'engine' => 'InnoDB',
    ],

I've tried these links but none has solved the issue:

PDOException SQLSTATE[HY000] [2002] No such file or directory

https://laracasts.com/discuss/channels/eloquent/sqlstatehy000-2002-no-such-file-or-directory

https://www.digitalocean.com/community/questions/sqlstate-hy000-2002-no-such-file-or-directory

blue pine
  • 472
  • 6
  • 17

0 Answers0