Hi @stephenwaite
Yes, i followed the steps mentioned on the link you provided before & it did not work
I was able to figure out the way!!
The key is to not use localhost or 127.0.0.1 as IP but to find out the IP bound to the mysql docker container & use that.
Below are the steps to figure out the IP for mysql docker container
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
88f8a6baf98c openemr/openemr:5.0.1 “./run_openemr.sh” 2 months ago Up 4 hours 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp lightsail_openemr_1
d05167f16b1f openemr/mysql-xtrabackup:latest “docker-entrypoint…” 2 months ago Up 4 hours 3306/tcp lightsail_mysql_1
So now we know the container id for mysql starts with d05167f16b1f*
Next we go to /var/lib/docker/containers/ and we will find dir which starts with d05167f16b1f*
We check hosts file in that directory & it will be something like below
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.81.0.3 d05167f16b1f
We need to use 172.81.0.3 as IP to connect to mysql & it works!