Current (as of 2020-11) docker setup experience

Hi guys,

I am trying to setup an openemr environment based on docker. My ultimate goal is to use it for my wife’s mental health clinic.

What I am trying to do is to follow the simplest docker guide from the forum to setup the 3 containers (mysql, phpmyadmin, openemr (standard/dev/flex)). Current status is that:

  1. mysql by default uses caching_sha2_password authentication method unknown to mysql components used by openemr:

PHP Warning: mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password] in /var/www/localhost/htdocs/openemr/library/classes/Installer.class.php on line 1240
PHP Warning: mysqli_real_connect(): (HY000/2054): The server requested authentication method unknown to the client in /var/www/localhost/htdocs/openemr/library/classes/Installer.class.php on line 1240

1.1 how to fix - fastest (but not optimal :slight_smile: ) is to downgrade mysql authentication method to mysql_native_password

  1. after 1.1 openemr is able to connect to mysql, however it is unable to proceed with db setup:

ERROR IN OPENEMR INSTALL: Unable to execute SQL: create database openemr character set utf8mb4 collate utf8mb4_general_ci due to: Can’t create database ‘openemr’; database exists
PHP Fatal error: Uncaught Exception: ERROR: unable to execute SQL: ‘create database openemr character set utf8mb4 collate utf8mb4_general_ci’ due to: Can’t create database ‘openemr’; database exists

2.1 it indeed exists, as it is created by openemr…

To sum it up - the setup is currently not working out of the box as I hoped it would. I would appreciate getting some help/having it fixed so that we could work with the system itself and asses if openemr works for my wife’s clinic.

Thank you,
Piotr

1 Like

Ah, so openemr does not work with mysql 8.* yet.

Using older mysql resolves mentioned problems.

docker run --detach --name mysql57 --env “MYSQL_ROOT_PASSWORD=root” --net mynet mysql:5.7 --character-set-server=utf8

1 Like

hi @polishcode ,
Rec looking into docker-compose. There’s an example starter docker-compose.yml script here:
openemr-devops/docker/openemr/5.0.2 at master · openemr/openemr-devops · GitHub

Thank you for the link :slight_smile:
In the meantime I was able to set up an instance on one of my raspberry pi 4b servers. The compilation takes a long time, but after that openemr works reasonably quick.

@polishcode ,
Speaking of rasberry pi :slight_smile:

oops forgot the link in above post, here it is:

Yup. Actually I’m a C++ mobile payments developer, it was the first time that I used docker/web environment at all. Took me a few hours to figure this all out, but worked in the end :slight_smile: Thank you!