Try change DB_HOST from localhost to "127.0.0.1"
PDOException - SQLSTATE[HY000] [2002] No such file or directory on Linux Mint
I have installed Laravel for the first time on my Linux Mint 18.0 and under Xampp. Following the instructions in https://laravel.com/docs/5.2/quickstart, when I ran the command php artisan migrate, I received the error: SQLSTATE[HY000] [1045] Access denied for user 'homestead'@'localhost' (using password: YES) Then, I searched for a solution and changed the .env file's db configuration to this:
DB_CONNECTION=mysql DB_HOST=localhost DB_DATABASE=laravelu DB_USERNAME=root DB_PASSWORD=''
Now I receive the error "PDOException - SQLSTATE[HY000] [2002] No such file or directory". I've tried some random solutions such as using a different environment (I tried php artisan migrate --env=production), but the problem still exists.
Please or to participate in this conversation.