Stuck on step 2, "Connecting to MySQL Server... ERROR. Check your login credentials. unable to connect to database as root"

hnccreative wrote on Monday, January 12, 2015:

Hi, I am trying to install Open EMR 4.2.0 on an Amazon Web Service Server. Already have Apache, PHP & MySQL setup. Someone else has installed Open EMR (that works) but I wanted to setup one as well to gain knowledge on how to do it on a server. I have done this with XAAMP on windows.

I am on step 2 requiring me to put in the information for mysql. When I put in a password I get the following error:

“Connecting to MySQL Server… ERROR. Check your login credentials. unable to connect to database as root”

When I try to change or add a password on the server (login with Putty) I get the following error:

‘Access denied for user ‘root’@‘localhost’ (using password: NO)’

I tried taking a look at this website for that error:

Do I have to create a password for mysql to setup Open EMR? We had someone setup Open EMR so I didn’t think I would need to change any of the login information.

fsgl wrote on Monday, January 12, 2015:

If this is a brand new installation & the setup will create the database, do not supply a password for root.

hnccreative wrote on Monday, January 12, 2015:

I understand to leave that blank but I am not sure what to use for password under the “Login Name: openemer”. Should this field already have a password or is this creating a password for the database? If I put the password there I get the error:

“Connecting to MySQL Server… ERROR. Check your login credentials. unable to connect to database as root”

I checked mysql for a password when I tried creating it and it says:

‘Access denied for user ‘root’@‘localhost’ (using password: NO)’

If I don’t add a password I receive the following error:

OpenEMR Setup

ERROR. Please pick a proper ‘Password’.
Click Back in browser to re-enter.

blankev wrote on Monday, January 12, 2015:

On a Server the Database name of MySQL for OpenEMR has to be the same. Since there are many Database names you usually get something in front of the “to be created” Database name. This Database with the web-accepted name (Amazon-name) has to be replaced in MySQL Server Database.

Something like:


If you use C_Panel it is easy to find the Database name and the Password for what is created during the initialization phase on Amazon.

fsgl wrote on Monday, January 12, 2015:

If OpenEMR has already been installed on this cloud server, this may be the source of the credentials problem.

Assuming that this copy is for production, it would be a good idea to have the educational experience on another server.

Toasting the production copy is not the quickest way “to win friends & influence people”.

It’s also easier to learn on localhost.

Hi, I had the same problem in local host:

I always try to see what is the problem. In this case we can’t acess databank with root user. Why?

OpenEMR asks for a creation of a series of 10 characters passwords, inclusive a pw for root, without it we have a message error and instalation stops waiting for the password.
Unfortunately, root alread exists with “password is nothing”. When phpmyadmin checks your input, it denies acess.
It is a kind of “logic bug” from OpenEMR instalation file.

So first (before everything else),
go to xamp console and open phpmyadmin:

In phpmyadmin create a new “root” user with a long password (same that you will use when configuring openemr).

Phpmyadmin will tell you that root already exists, don’t bother, create a new root user (your pc won’t blow up, promisse!)

the same password you created for root is inserted here:

V E R Y I M P O R T A N T S T E P:

To acess root you also need to insert the password in file:

if you tryed a lot of times, you can find this error:

Always read the erro message: cant create openemr because… it already exists. In some way You’ve created it before while trying to install OpenEMR. Solution → go to phpmyadmin delete openemr databank and restart the instalation process.

Then you will see this window:

Why openemr don´t shows us the answer, instead send us to another page? Anyway here is the answer:

This is the apache configuration file in xampp localhost windows:


OpenEMR is a wonderfull computer application, I’Ve been using it for year, congrats to the community.

Best regards from Brazil
Paulo Kanda

1 Like

I tried to follow this approach but still running in the same error

I am connecting to mysql successfully but stuck there the system is not continuing the deployment.
using Chrome as a browser and intending to install the OpenEMR 7.0.1 version

Hi Mayas Sleiman,
Welcome to openEmr Community :handshake:.Refer below link to know about openEmr Installation.