I'm trying to create a new laravel app using sail. However, with this command:
./vendor/bin/sail up
It shows:
Attaching to test-app-laravel.test-1, test-app-mysql-1
Error response from daemon: driver failed programming external connectivity on endpoint test-app-mysql-1 Bind for 0.0.0.0:3306 failed: port is already allocated
Im using docker and I have another app using that port. Do you know how to change the sail configuration to use a different one?
CodePudding user response:
Check the docker-compose.yml
configuration, by default the mysql
configuration should have a ${FORWARD_DB_PORT:-3306}:3306
on the ports entry. Add FORWARD_DB_PORT=33060
(or other port) to your .env
file.