SOLVED Upgrade of OpenEMR from 5.0.0 to 5.0.1 fails

Situation
My problem, as things stand, is simply stated: I cannot upgrade OpenEMR from version 5.0.0-2 to version 5.0.1.

What happens?

I get this error message: “This package can not upgrade OpenEMR, because unable to confirm presence of a mysql credentials and/or database.”

Additional information:

This is a fresh installation of both my OS and OpenEMR. I restored to OpenEMR a backup made using the same version (5.0.0-2). It is working as it should.

How can I resolve the failing upgrade of OpenEMR?

Many thanks.

OpenEMR Version
I’m using OpenEMR version 5.0.0-2.

Browser:
I’m using: Chromium v5.0.0 (6).

Operating System
I’m using: Lubuntu 16.04.6 LTS. (I wish to upgrade to 18.04 LTS but not before successfully upgrading OpenEMR.)

Logs
OpenEMR install log:

jue may  2 18:53:23 CEST 2019: For upgrade, confirmed that the mysql database (openemr) and mysql user (openemr) exist
jue may  2 18:54:52 CEST 2019: MySQL 'openemr' database does not exist (or can't be accessed), unable to upgrade.
jue may  2 18:54:52 CEST 2019: EXITING.......… '''

have you tried logging in to mysql with your credentials from the command line?

mysql -uusername -ppassword openemr

Thank you for your reply.

Yes, I can log in successfully using user name “root” and my mysql root password.

is that what you have in your sites/default/sqlconf.php ?

the openemr mysql user is usually used

No, sorry. In 'sites/default/sqlconf.php` the user is ‘openemr’.

Yes, I can log in to mysql from the command line with user ‘openemr’ and the password specified in that file.

Does anyone have any further ideas?

Many thanks.

did you get into the openemr database with that command or did you use openemr; from the mysql command prompt?

To be clear, here is my output:

robert@robert-Lenovo-B590:~$ mysql -uopenemr -pMYPASSWORD openemr
mysql: [Warning] Using a password on the command line interface can be insecure.
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.26-0ubuntu0.16.04.1 (Ubuntu)

Copyright (c) 2000, 2019, 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> use openemr;
Database changed
mysql>

nice, and what php version are you running? from the lubuntu command line

php -v

robert@robert-Lenovo-B590:~$ php -v
PHP 7.0.33-0ubuntu0.16.04.4 (cli) ( NTS )
Copyright © 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright © 1998-2017 Zend Technologies
with Zend OPcache v7.0.33-0ubuntu0.16.04.4, Copyright © 1999-2017, by Zend Technologies
robert@robert-Lenovo-B590:~

and you’re currently running the debian/ubuntu package php7_5.0.0-2_all.deb?

Yes, that’s correct.

nice, just installed it and will now run upgrade to 5.0.1, https://www.open-emr.org/wiki/index.php/Ubuntu_Package_Upgrade_to_5.0.1_with_PHP7

hi @rdh61, it was successful maybe because am running ubuntu 16

I’m on Lubuntu 16.04. Would the choice of desktop environment make a difference?

prob not, looking at this wondering if your mysql location might be different than /var/lib/mysql

sorry that shouldn’t matter but there’s definitely something wrong happening here

I have mysql and openemr directories in var/lib/mysql.

I have modified some of the forms (added fields to ‘SOAP’, ‘Add New Issue’, and ‘reviewofs’). Might this be the problem?

prob not, is your openemr directory in /var/www/openemr?

Yes, it is there…

how about this command ?
mysql -u openemr -h localhost --password="password" -e 'show databases'

Thanks for trying to help me.

robert@robert-Lenovo-B590:~$ mysql -uopenemr -h localhost --password=MYPASSWORD -e 'show databases'
mysql: [Warning] Using a password on the command line interface can be insecure.
+--------------------+
| Database           |
+--------------------+
| information_schema |
| openemr            |
+--------------------+
robert@robert-Lenovo-B590:~$