OpenEMR unable to log in as root, but root password works from the terminal

I’ve run into this issue where I am getting the “check mysqld is running” even though I am using a root password. I am able to log in using root using the terminal but it refuses to let openEMR access it. I even tried creating a new instance and it won’t let me log in as root at all.

This was working fine this morning. A few things: the mysql server is mounted on the /opt directory.
I installed a bunch of php libraries.
I recently installed phpmyadmin (this was an issue before)

Any tips or advice greatly appreciated!

Error log:

So the backstory is that I had a development site that was supposed to go live. I copied the old documents directory into the live site and it seems to have resolved the issue.

Where in the OpenEMR environment are you trying to have it use the root mysql account? The only place this is relevant is likely to be during installation, when the installer creates a non-root mysql user for it to use for day-to-day use.

Also, given phpmyadmin is a potential security risk, I would only install it if you know what you’re doing and need to use phpmyadmin specifically.

Using root was a method of troubleshooting. This is the scenario better explained:

I was moving a custom version of OpenEMR from one instance on Amazon to the new instance on GCP. I am also doing an upgrade from 6.01 to 7.01. The GCP instance was treated as a development server until we go live with production. I had imported the documents directory into the new system and this is where the problems started happening. I used the old certificates and the sixa and sixb files and i was unable to access mySQL during install of even a new system and after much struggling I saw it was related to the sites/documents/certificates file. I removed the public and private keys, removed the sixa and sixb files and everything started to work.

As far as phpmyadmin goes. Phpmyadmin is securely installed and is a powerful tool for troubleshooting data issues and is specifically necessary when I have modules that are transmitting raw data to different targets. Viewing the logged the raw data sent gives me both a micro and macro view of what is happening and is a vital tool when it comes to troubleshooting.

Do I know what I am doing? Well, I’ve been learning / developing OpenEMR since 2014 so I would hope so.