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

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.

1 Like

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:

ok, but think there might still be a prob with your situation

you should be able to install the .tar.gz by following the instructions even though the .deb is under construction

there’s also docker install which is really :cool:

1 Like

for instance, on a ubuntu found this:

~$ mysql --version
mysql  Ver 14.14 Distrib 5.7.29, for Linux (x86_64) using  EditLine wrapper

so when try to connect without sudo

~$ mysql -u root -p
Enter password: 
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

where with sudo works (note the # indicating root shell)

~# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 906
Server version: 5.7.29-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

so after

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'somepassword';
Query OK, 0 rows affected (0.01 sec)

mysql> FLUSH PRIVILEGES;

now works without sudo

$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 907
Server version: 5.7.29-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> quit
Bye
2 Likes

To re-clarify,
The linux package is for all linux’s including ubuntu/mint/debian. The specific package for ubuntu/mint/debian was built to make it easier to install and upgrade OpenEMR on ubuntu/mint/debian.

1 Like

Thanks. This is helpful. I will try this out today.

I created previously a Data Base and user with all privileges, and after I choose the alternative mode to install openemer

after put the of your data base name, your user and password and remember the name and password to the user of openemr and continue with the instalation.

Stephen, thanks for the time you spent troubleshooting on my behalf. I wanted to respond earlier but have been slammed with CoVid-19 preparations. The information you provided above was precisely the problem that I was having. Once I configured the root account of mysql to login without needing sudo access, I was able to proceed with the installation without a hitch. Looking forward to learning more about openEMR when I can find the time.

Hello, i have a similar problem, my installation can not continue from “Connecting to MySQL…” In step 2, but I can use MySQL from command line without sudo, I need help.

Everyone hitting this thread please follow Stephens excellent advise and solution Step 2 (Database and Initial User Setup) of OpenEMR Fails.

Never run/install OpenEMR under root and same with mySQL/Maria user account for OpenEMR access.

I finally installed Open-Emr, just i put the solution for my case in the next link

2 Likes