I am running using Sail for my side project, and use Homestead for work.
I get conflicts with port 3306, so I moved Sail to 3307, but now for some reason I can't get TablePlus to connect to the DB.
Just to be clear, the site loads in the browser and sail tinker
, sail artisan:migrate
both work fine, it's JUST TablePlus that isn't working?!
It worked fine last weekend when I was using it, but after getting the issue with something using 3306
I decided to change the port to 3307
I've run docker-compose down -v
to delete the volume including the db, and brought it back up, and the site works after a migration, but still nothing with TP.
The following is my .env
:
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=tall_events
DB_USERNAME=sail
DB_PASSWORD=password
FORWARD_DB_PORT=3307
And my docker-compose.yml
file:
mysql:
image: "mysql:8.0"
ports:
- "${FORWARD_DB_PORT:-3307}:3307"
environment:
MYSQL_ROOT_PASSWORD: "${DB_PASSWORD}"
MYSQL_DATABASE: "${DB_DATABASE}"
MYSQL_USER: "${DB_USERNAME}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
MYSQL_ALLOW_EMPTY_PASSWORD: "no"
volumes:
- "sailmysql:/var/lib/mysql"
It's showing as port 3307
on Docker Desktop:
But when I try to connect with TablePlus on 3307
I get the following: