First I will explain my setup: I run Laravel in WSL (Windows Subsystem for Linux) and I have XAMPP on Windows. What I'm trying to do is to run MySQL service on XAMPP and connect it with my Laravel project. I have modified my .env file setting the root password and I have created the "laravel" database with phpMyAdmin.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=mypassword
With this setup I tried to run in WSL
php artisan migrate
But I got this error
SQLSTATE[HY000] [2002] Connection refused
Then I changed the DB_HOST to localhost, that is a common solution for this, but then I got this other error.
SQLSTATE[HY000] [2002] No such file or directory
Now I have no idea what else to do. I got stucked. Any help would be appreciated.