Access Docker DB

Hi there,

I’ve installed OpenEMR via Docker and all works great. My question is, how can I access the docker db directly? I continue to receive an error that msql-server is not install, and when I install mysql openemr database is not found. I’ve tried mysql -u root -p -h -P 3306 and also just mysql -u root -p openemr.

EDIT: I was able to get past this issue using the following:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'pass';

The issue now is openemr db does not exist, I have logged in as: mysql -u root -p openemr -h -P 3306.

the only databases I see is information_schema, mysql, performance_schema and sys. I have also downloaded the backup db from the demo and imported it into a db I created ‘openemr’ however I am not sure how to bind this to the actual db.

Appreciate any help on how to access the docker db.


hi @Sun_1

docker ps // find the container id of the mysql docker below it's 17f370581603
// 17f370581603   mariadb:10.11           "docker-entrypoint.s…"   5 days ago   Up 5 days>3306/tcp, :::8320->3306/tcp                                                                  development-easy_mysql_1
// then you can execute the /bin/bash shell to get to a cmd prompt
docker exec -it 17f370581603 /bin/bash
// then access the mysql client cmd prompt
mysql -uroot -proot openemr

Thank you Stephen, much appreciated :slightly_smiling_face: