Blank screen on first start of OpenEMR 5.0.2

I notice there is something wrong with my mysql installation:

robert@roberts-work-laptop:~$ mysql
ERROR 1045 (28000): Access denied for user 'robert'@'localhost' (using password: NO)
robert@roberts-work-laptop:~$ sudo mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

I am guessing this is relevant to my problem, but I have no idea what to do about it.

I can’t see a problem with the MySQL installation. It’s just you are providing a wrong password thus getting the access denied error.
you can use mysql -u{username} -p command and it will ask you for your MySQL password which i suppose you remember.
e.g. mysql -urobert -p

@im-Amitto Thank you for your reply.

robert@roberts-work-laptop:~$ mysql -urobert -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'robert'@'localhost' (using password: YES)

I am 98% certain of my password. But if it is wrong, how would I recover it or reset it?

You are not providing a password.
there are instructions you need to follow
In the openemr directory there is a Documentation directory, in there there is a file named INSTALL
You need to read that. You can also find it here:

openemr/INSTALL at master · openemr/openemr · GitHub

Also, which version of Mysql are you using?

@gutiersa Hello, why do you say I am not providing a password? I did provide a password! The password is never shown in the terminal window, it is hidden. The code I posted is copied from the terminal window. It says “using password: YES”.

Regarding the installation instructions, they are these same as those on the wiki page (the link I provided in my first message), and yes, I followed them.

Mysql 8.0.20

Thank you.

sorry, I had not finished reading the thread.
I had read up to here:

robert@roberts-work-laptop:~$ mysql
ERROR 1045 (28000): Access denied for user ‘robert’@‘localhost’ (using password: NO)

Openemr does not yet work with Mysql 8. You can ready my threads from the few recent weeks. Let me find them for you If you want to trouble shoot the problem and get it to work:

The Mysql 8 Challenge for Developers

If you look toward the more recent exchanges you will see some instructions. You need to use mysql_native_password instead of caching_sha2_password plugin for the server.

Secondly, when installing mysql8, the root password is automatically created using the latter. You would need to make a new root user and grant privileges separately using the former.
But there are other problems. I just went back and installed the mysql 5.7 server

https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html
Check this out

Hmmm… That’s distressing. I just upgraded my OS on my work laptop without a thought that I might not be able to use OpenEMR on it. All my patient data are on the database. Luckily I have a home computer running Mint 18.04 with MySQL 5 (if I remember correctly). I had used the restore script to clone the database, then successfully upgraded from OpenEMR 5.01 to 5.0.2, so at least I can take my patient notes home and add them to the database. Not ideal though. Maybe on my work laptop I could use MariaDB instead… Would that work?

Thank you, but I have found that “sudo mysql -uroot -p” works. Is that normal behaviour? Shouldn’t I be able to access it as robert?

By default mysql server only have a root user which has all the privilege.
If you want to use robert then you first need to create a user robert in mysql.
To list out all existing mysql users, you can use the below command.
select user from mysql.user;

Well, if that’s the default behaviour, I’ll leave it at that. The only reason I installed mysql is in order to use openemr, but I understand from Sandra Gutierrez on this thread that in any case openemr does not work with mysql 8.

Yes, you may use Maria db or mysql 5.7

I have been using mysql 8.0 with openemr for some time now and haven’t got in any problem yet but i am using the master branch of openemr so i am not sure about released versions.

Any idea when the .deb installation package might become available?

Thank you for your help. One last question. Could an openemr backup made with mysql be restored onto an openem installation using Mariadb?

I really don’t know anything about Mariadb. But others in this forum may be able to answer that. Also, you can try Mariadb forums. I guess it would depend on the version of Mysql. I believe that is the reason there was the fork in the first place.
I will post some commands for Mysql8 as soon as I find them, if you would like to keep trying it.
BTW, I could not get mysql8 to work from a different host.

In Mysql8, you can no longer create a user with the GRANT command.
Here are some useful commands you may be able to use for mysql8. They are correct as of the date of this post.
This must be in your my.cnf file, under [mysqld]:

default-authentication-plugin = mysql_native_password

these are the commands for the mysql command line:

CREATE USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘secretpassword’;
GRANT ALL ON . TO ‘root’@‘localhost’;

Flush priviledges is no longer needed!

I would love to use openemr with MySQL8. Is your version of openemr very different from the 5.0.2_2 release?

@gutiersa I have never used the 5.0.2_2 so i have no idea about that
@rdh61 using the backup should not be a problem till they have follow same charset. Let me know if you face any error though.

Who would know what the difference is between the master branch and the releases is? Do you know who I can ask?
Thanks

So I purged my system of MySQL and openemr, installed MariaDB and started over following meticulously these instructions: https://www.open-emr.org/wiki/index.php/OpenEMR_5.0.2_Linux_Installation including the recommended configuration of php.ini.

I get to this:

Configuring the Install through the WEB GUI

1. Open up web-browser and point it to the installation script at http://localhost/openemr

And what happens is this:

OpenEMR Setup

ERROR : PHP MySQL extension missing. To continue, install and enable MySQL extension, then restart web server.

But my php-mysql file is installed and is the latest version. Where do I go from here?