Help me debug a Laravel Sail Database Connection Issue
Budget: $10 – $30 USD
I keep getting the "SQLSTATE[HY000] [2002] Connection refused" error. I have tried just about every relevant suggestion and after spending about 45 hours on this, cannot get ANYWHERE with Sail/Docker.
I installed Sail on a pre-existing project using:
php artisan sail:install
php artisan sail:publish
In Ubuntu (running Windows WSL2): I've tried:
sail build --no-cache
sail up -d
But alas, still:
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from...
At one point, I was able to access the mysql cli and verify there was a database with the correct name, but the HTTP requests just weren't being accepted. However, after reinstalling sail a few times and changing environment variables, I can no longer do this either, as I get the mysql cli error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost'
I need someone who develops often with Laravel Sail (preferably on Windows with Ubuntu experience) to assist me in solving this database error.
I installed Sail on a pre-existing project using:
php artisan sail:install
php artisan sail:publish
In Ubuntu (running Windows WSL2): I've tried:
sail build --no-cache
sail up -d
But alas, still:
SQLSTATE[HY000] [2002] Connection refused (SQL: select * from...
At one point, I was able to access the mysql cli and verify there was a database with the correct name, but the HTTP requests just weren't being accepted. However, after reinstalling sail a few times and changing environment variables, I can no longer do this either, as I get the mysql cli error:
ERROR 1045 (28000): Access denied for user 'root'@'localhost'
I need someone who develops often with Laravel Sail (preferably on Windows with Ubuntu experience) to assist me in solving this database error.