Docker : Multiple Instances for One MySQL Database -


can create multiple containers host single shared database in docker,if can create face issues multiple instance on select event example ?

thank you.

allow me paraphrase question bit. please correct me if have misunderstood anything.

q: can run multi instances of mysql database using docker technology?

a: short answer: yes because docker container process on machine.

q: if have multi instances of mysql database running on same host, how know instance performing query on?

a: depends on connection string set database client.

every database instances have corresponding listener process bind specific port of host.

now, each port can bind process. 1 1 relation.

essentially if have 10 sql instances installed, bind unique port each. port number defined in connection string determines database instance you'll talking to.

something worth noting that, docker containersare self-contained. can sort-of see them conventional virtual machine except more light-weighted. is, container have own networking infrastructure, similar physical host. physical host able see containerized database, you'll have port-forward bind port.

if paragraph above doesn't make sense i'll recommend expore docker's ports or -p options abit.

see: https://docs.docker.com/engine/userguide/networking/default_network/binding/


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -