Step 2 (Database and Initial User Setup) of OpenEMR Fails

ok, but think there might still be a prob with your situation

you should be able to install the .tar.gz by following the instructions even though the .deb is under construction

there’s also docker install which is really :cool:

1 Like

for instance, on a ubuntu found this:

~$ mysql --version
mysql  Ver 14.14 Distrib 5.7.29, for Linux (x86_64) using  EditLine wrapper

so when try to connect without sudo

~$ mysql -u root -p
Enter password: 
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

where with sudo works (note the # indicating root shell)

~# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 906
Server version: 5.7.29-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

so after

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'somepassword';
Query OK, 0 rows affected (0.01 sec)

mysql> FLUSH PRIVILEGES;

now works without sudo

$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 907
Server version: 5.7.29-0ubuntu0.18.04.1 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> quit
Bye
2 Likes

To re-clarify,
The linux package is for all linux’s including ubuntu/mint/debian. The specific package for ubuntu/mint/debian was built to make it easier to install and upgrade OpenEMR on ubuntu/mint/debian.

1 Like

Thanks. This is helpful. I will try this out today.

I created previously a Data Base and user with all privileges, and after I choose the alternative mode to install openemer

after put the of your data base name, your user and password and remember the name and password to the user of openemr and continue with the instalation.

Stephen, thanks for the time you spent troubleshooting on my behalf. I wanted to respond earlier but have been slammed with CoVid-19 preparations. The information you provided above was precisely the problem that I was having. Once I configured the root account of mysql to login without needing sudo access, I was able to proceed with the installation without a hitch. Looking forward to learning more about openEMR when I can find the time.

Hello, i have a similar problem, my installation can not continue from “Connecting to MySQL…” In step 2, but I can use MySQL from command line without sudo, I need help.

Everyone hitting this thread please follow Stephens excellent advise and solution Step 2 (Database and Initial User Setup) of OpenEMR Fails.

Never run/install OpenEMR under root and same with mySQL/Maria user account for OpenEMR access.

I finally installed Open-Emr, just i put the solution for my case in the next link

2 Likes