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
?
CodePudding user response:
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