Cannot access local MySQL from Docker Volume

Hi,

I am trying to run docker-compose based on compose files that I have. I am trying to map a volume with the name db to the main container that I am using. All is well, other than the fact that the db volume doesn’t pull the tables or databases from my local machine where I can access the databases by using programs like Heidi and logging in via localhost.

I don’t know whether this is a networking issue? I can connect to the database perfectly, but the tables are missing so I cannot access anything.

db:
image: percona:latest
volumes:
- db:/var/lib/mysql
networks:
- default
ports:
- ‘3307:3306’
volumes:
db:
external:
name: db

Any help would be much appreciated! Port 3307 is the port that the database is hosted on on my actual machine.