After Laravel installation by sail and docker on windows, I run the server by:
./vendaor/bin/sail up -d
and this is the containers:

I can't connect to MySQL by user: root and password and port 3306
docker exec -it app-mysql-1 mysql -u root -p
I delete the app-mysql-1 from app containers and Run a MySQL image but problem still exists and I can't connect to MySQL and make or migrate.
I can find the auto generated MySQL password and can change it but can't connect and use this one in app containers

How I can connect to MySQL in the app containers?
If you didn't change the default Sail database user then you should use:
User: sail
Password: password
And in ./.env:
DB_USERNAME=sail
DB_PASSWORD=password
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With