Read about OpenEMR's Response to the COVID-19 Pandemic at https://www.open-emr.org/covid19/

Step 2 (Database and Initial User Setup) of OpenEMR Fails

Situation
I have attempted an install of OpenEMR multiple times and the installation will not proceed past Step 2 because it is unable to connect to the MySQL instance and create the database with the root account. The error I am receiving is:
Connecting to MySQL Server… ERROR . Check your login credentials. unable to connect to database as root
The root account for MySQL has a password. I have confirmed this by logging into MySQL from the terminal using sudo mysql -u root -p. I have properly entered all of the required parameters, but the install continues to fail at this point. I am running a VM with Ubuntu 18.04 and all application dependencies have been installed (i.e. LAMP stack). I’ve followed the instructions provided on the open-emr.org site and scoured the forums and google trying to find a solution. What am I missing? Any help would be greatly appreciated.

OpenEMR Version
I’m using OpenEMR version 5.0.2

Browser:
I’m using: Chrome

Operating System
I’m using Linux (Ubuntu 18.04 distro)

Logs
I am unable to find any installation logs that would provide any assistance.

remember running into this and believe some of the newer ubuntus prevent root access unless from command line like you’ve indicated

try creating an openemr user with grants to the openemr database and try again
here’s advice

Thanks for the response. Unfortunately, this doesn’t look like a good solution from a security standpoint. I may just download an older version of Ubuntu and try it again. I’m running the OS in a virtual machine, so I should be able to get something going in a couple of hours. I’ll try again tomorrow and report back.

hi @virtualHITman, having a non-root user accessing the openemr database is preferred and the above link points directly to the concerns regarding the accepted answer

Try this…
Download OpenEMR 5.01 php7 version Deb.
Installing will take care of the dependencies.
Then upgrade to 5.02 as per documentation.

The 5.0.1 deb won’t work on Ubuntu 18.04 (some bugs to iron out, which is why the 5.0.2 deb package isn’t out yet). That being said, doesn’t make sense that 18.04 would not allow access to root mysql user beyond cli. I hope that is not true. Can we confirm this?

sure, will run a quick setup

looks like it proceeds fine but tested with mariadb

remembering that if you aren’t able to
mysql -u root -p from the command line (no sudo) then the install will not proceed

maybe this is the problem

@stephenwaite , Good to hear. Was gonna go find a high building, but now can delay those plans :slight_smile:

@virtualHITman , what mysql/mariadb version are you using?

1 Like

I’ll have to check once I am back in the office tomorrow. I am happy to connect via a webex if someone wants to witness what I am seeing on my end.

I can check that tomorrow as well.

Are you suggesting I create another MySQL user that has root privileges but isn’t called root? Not sure I am following. If that is the case, then I would suspect a lot of users would be complaining about installation failures at the database creation step. I just haven’t seen any support requests related to my issue, so I suspect it is something fundamental I am missing here or the latest version of OpenEMR will not work with Ubuntu 18.04 at this point.

Yesterday I did an install of openemr-php7_5.0.1-4_all.deb on 18.04 Server and it ran just fine. Modified the php.ini files and I then upgraded it to 5.02.
I just let the deb take care of all the heavy lifting.

1 Like

Very glad to hear the deb package is working on ubuntu 18.04.

hi @virtualHITman, was suggesting creating a mysql user that only has access to the openemr database, that’s what the openemr setup does when it’s working properly

If the 5.0.2 version isn’t out yet, what is this? openemr-5.0.2.tar.gz (M

It says Stable Production Release on the webpage.
https://www.open-emr.org/wiki/index.php/OpenEMR_Downloads

I’ve followed the instructions that are also included on this page including installation of all dependencies. The only difference is I installed the 18.04 version of Ubuntu server as opposed to the 16.04 version.

@stephenwaite, therein lies the problem. I can’t create a user for the openemr database because the openemr database doesn’t exist. I’m relying on the installation script to do that for me, but the database creation step is where the installation is halting when attempting to install version 5.0.2 on Ubuntu Server 18.04. The error message received is that it can’t connect to MySQL with the root account (I’ve eliminated the obvious like verifying the root password I’m entering for step 2 is right, caps lock key is off, no interfering firewall rules, etc.). However, I can connect to MySQL with the root account just fine from the command line.

I downloaded the latest stable release of openemr from this page: https://www.open-emr.org/wiki/index.php/OpenEMR_Downloads I followed the installation instructions available for Linux including installation of all dependencies. The only difference is that I installed Ubuntu Server 18.04 as opposed to Ubuntu Server 16.04 which is the OS version referenced in the installation guide.

I saw your post regarding an install of openemr-php_5.0.1-4_all.deb on Ubuntu Server version 18.04 and then upgraded to 5.0.2. Where do you go to download previous versions of openEMR?

I should point out that I’m not a Linux guru, but I’m no slouch either. I’ve had experience installing and administering several other open source solutions that run on Linux (Alfresco, SugarCRM, Drupal, etc.). I’m encouraged there is a community out there that wants to help physicians regain control of an aspect of their practice that has been lost (documentation of encounter and workflow). I have worked with traditional EMR systems for over 10 years, and in my opinion, they have failed to deliver on their promises. The merger/acquisition activity in the healthcare IT space has only resulted in more confusion and disruption to those trying to deliver medicine in a safe and cost-effective manner. Sorry for the soapbox, but I suspect the reality I describe above drives many “entrepreneurial physicians” to explore alternatives like openEMR. In my experience, most folks don’t have the tenacity or discipline to stay the course when they encounter an obstacle like this (i.e. installation woes), so I greatly appreciate your assistance. I hope the frustration I am currently experiencing with the installation process will be an opportunity to learn and potentially produce a better guide for those that want to test drive the software.

what’s the output of
mysql --version

that’s the linux gzipped tarball for building from scratch, the .deb is an actual debian package that @brady.miller built a while back with the help of another developer i believe

I think I just solved my problem. I didn’t realize there was a “special” debian package for 5.0.2. I just scrolled to the bottom of the page and saw this little jewel…

Ubuntu / Mint / Debian

  • Deb OpenEMR 5.0.2 package is currently under construction.

Duhhhh. I just assumed the standard Linux version would work for my distro.

Recommendation: perhaps a message under the Linux version that says STOP: If you are looking for the version of openEMR that runs on a Debian distribution of Linux (e.g. Ubuntu), this isn’t the download you’re looking for; please scroll to the bottom of the page!

:rofl: