Invalid username or password

Can you run this command

MariaDB [openemr]> select * from log order by date desc limit 10;

The Cloud Express package on AWS runs in Docker containers, and uses MySQL, not MariaDB.

From the root command prompt on your EC2 instance, you will first want to enter the MySQL docker container:

docker exec -it $(docker ps | grep mysql | cut -f 1 -d " ") /bin/bash

Then connect to the MySQL database server:

mysql -h 127.0.0.1 -u root -p;

Then switch to the OpenEMR database:

\u openemr

Then execute the SQL command:

select * from log order by date desc limit 10;

Thanks @snailwell
Stupid question: when connecting to the MySQL database server I’m prompted to enter a password which doesn’t seem to be the instance ID and I don’t recall having assigned any other password during installation… Any tips?

I had a teacher who told us: “There are no stupid questions. Stupid is the one who doesn’t ask.” If you just press enter?

:slight_smile: we did try that as well, but I’m afraid it doesn’t work either:
ERROR 1045 (28000): Access denied for user ‘root’@‘127.0.0.1’ (using password: NO)

root@localhost, root@127.0.0.1 and root@% can have different passwords. Try localhost without passwords. If it still has an error, you can reset the password.
how to reset my root password in mysql docker image - Stack Overflow

UPDATE: turns out the default MySQL database server password for the Cloud Express package on AWS is ‘root’
Followed @snailwell 's steps, ran @stephenwaite 's command and voila…we’re back online!
Thanks so much to all for your advice and support!

1 Like