Read about OpenEMR's Response to the COVID-19 Pandemic at

Stuck on step 2 of installation

I’m stuck on step 2 of the OpenEMR installation.
I’m using OpenEMR version 5.0.2 on Linux.

I’m using OpenEMR on a Linux server running PHP 7.1
Below is the message I get when I try to proceed.
Step 3

Configuring OpenEMR…

Connecting to MySQL Server… OK.
Creating database… ERROR. Check your login credentials. unable to execute SQL: ‘create database openemr character set utf8 collate utf8_general_ci’ due to: Access denied for user ‘abalheal_root’@‘localhost’ to database 'openemr

There are various issues that can crop up at this point, but firstly have you checked the password is correct for the abalheal_root MySQL account?

Yes I checked the password. I even changed it and then used the new one. Still the same result.

What operating system is this and is it MySQL or MariaDB?

It’s MySQL. And according to the email I just got from my hosting company, it’s a shared hosting server and they are the only ones with root access. Is there anyway to install OpenEMR without root?

It would be helpful to know which Linux distro it is, that’s what I meant by asking what OS it is.
There’s an issue with Debian and using the root account.

Is this a separate account you’ve created for this purpose and not the actual root MySQL account? There can be issues using an actual root account. It looks as though it isn’t the actual root account.

“If you are on Debian 9 using MariaDB and have root access problems with the installer, either disable the unix_socket plugin, or create an additional user with root privileges and use this new user as the “root” user for installation”

It also prevents login for root when not on the console.

Do you see anything in /var/log/apache/error.log?

What do you get when you run this at the MySQL terminal:
SELECT host, user FROM mysql.user;

Going by the error message, it doesn’t sound as though you’re hitting the issue of having a too-complex a password:

This is the server information.

Note that you’re not using MySQL, you’re using MariaDB. It’s important to know the distinction because advice regarding issues relates to specific software.

Admin password of MariaDb doesn’t seem to work

Can’t setup/clean reinstall MariaDB/MySQL on Debian Stretch 9

When I run
SELECT host, user FROM mysql.user
I got
MySQL said:
#1142 - SELECT command denied to user 'abalheal'@'localhost' for table 'user'

Try using your abalheal_root account rather than your abalheal account to do this.


Please check whether the mysql user has necessary permission to access database.

Also try with the below command for select permission
“GRANT SELECT ON database_name.* TO ‘user’@‘localhost’;”

Refer the following link :

Hope it may help you.


The easier way to install 5.0.2 on Linux, is make 5.0.1. installation with php package, and upgrade to 5.0.2.
Very easy process

How is this easier than installing 5.0.2 in the first instance?

Its one click installation, no any passwords required.

And after 5.0.1 installation, you just need to restore your 5.0.1 backup.tar data file, and then upgrade to 5.0.2.

This process is mostly recommended for users who switching EMR from windows base platform to Linux.

All process for new Linux installation from scratch will take maximum 30 minutes

Thanks. I installed 5.0.1 and used the patch.