Wiki Spaces
Documentation
Projects
Resources
Get Help from Others
Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack
Be sure the MySQL database engine is running first.
If MySQL is not running, the following messages may appear on OpenMRS console log as well as in the Tomcat log file:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSourceServiceTarget' defined in class path resource applicationContext-service.xml: : .......... followed by stack trace
These errors may be related to MySQL Database startup.
There are multiple different versions of MySQL provided with the link given in the developer’s guide. It could be confusing for new developers.
The easiest way is to download using apt.
Be sure to download MySQL server instead of MySQL client.
One might face difficulties in setting up MySQL 5.6 in the newer releases of Ubuntu (like 18.04 or 20.04). Nothing to worry. Here is a step-by-step guide for doing that.
Download the MySQL Community Server DEB Bundle from here.
Select 5.6.*
as Product Version, Debian Linux
as Operating System and then download the 32-bit or 64-bit DEB Bundle as per the system's requirement.
It basically contains individual packages like mysql-common
, mysql-community-client
, mysql-client
, mysql-community-server
, etc.
Install the packages individually using dpkg -i <package-name>.deb
Note that it will be required to go in a certain order for installing the packages, which could be found out by trial-and-error (see the error messages if any for the other package's requirement).
In case there is some error for missing dependencies, run sudo apt-get install -f
I use Ubuntu 20.04 and I went in the following order:
sudo dpkg -i mysql-common_5.6.47-1debian9_amd64.deb sudo dpkg -i mysql-community-client_5.6.47-1debian9_amd64.deb sudo dpkg -i mysql-client_5.6.47-1debian9_amd64.deb sudo dpkg -i mysql-community-server_5.6.47-1debian9_amd64.deb
After this, I got some errors (maybe because of the order I followed). I again did:
sudo dpkg -i mysql-common_5.6.47-1debian9_amd64.deb sudo dpkg -i mysql-community-client_5.6.47-1debian9_amd64.deb
After this, I got some errors about missing dependencies, so I ran:
sudo apt-get install -f
That's it, MySQL 5.6 successfully got installed!
Try this:
Type the following lines and press Enter after each one:
use OpenMRS; create user openmrs identified by 'PASSWORD'; GRANT ALL ON openmrs.* TO 'openmrs'@'%';
In this file, ensure it says the following:
### Database connection properties connection.username=openmrs connection.password=openmrs
For more troubleshooting tips see Troubleshooting Tomcat.
Clear the browser cache.
mvn jetty:run
The time taken for maven to compile could vary for different computers.
Kill the previous mvn clean install or mvn jetty: run every time you rerun maven. Otherwise, it might gives a following error indicating address already in use.
After opening http://localhost:8080/openmrs in the web browser, you might encounter the following error.
Close the window and kill the prior operations.
Rerun mvn jetty:run in the webapp folder and it usually works.
6 Comments
user-07ac4
when i tries to open "openmrs" from the link present on the page
"http://localhost:8080/manager/html", it gave an error
"
HTTP Status 404 - /openmrs/
type Status report
message /openmrs/
description The requested resource (/openmrs/) is not available.
i did all the settings given in this trouble shooting guide but nothing helped.
can anybody please guide me on this?
Michael Downey
Hi Anuprita. Have you followed the instructions described on the page Installing OpenMRS? If so, and you still have problems, please write to the implementers mailing list and describe the problem – someone should be able to help you work through it. Thanks!
user-144e9
Hi all, I'm trying to install OpenMRS-standalone version. I deployed the .war file correctly as instructed in one of the previous pages.
I did not install mysql explicitly because I am running wamp server on my Windows machine.
Whenever I try to install OpenMRS I get this error.
According to the error message, it seems I've not provided my root password for MySQL but I have not set any password for root.
Any help is appreciated.
TR Staake
I am getting the same error. I have set up a password for root in mySQL and am able to login to mySQL via terminal using:
I should mention that I did have a DB installed and connected to previously but was having issues so I removed the DB and tried to reinitialize as outlined in Installation for Developers on Mac OS.
I installed mySQL via homebrew.
I am not seeing the ~/.OpenMRS directory either, I am assuming that is because this setup is what creates it. I do see this when I am trying to initialize:
do i need to modify this to not be localhost as mentioned in: Installation for Developers on Mac OS?
Ayuk Etta
hey Rusira i do not if you have found your answer but the root password field is required when doing the initial setup so if you do not have you need to set it for the setup to work nicely.if you are using xampp there is a script at /opt/lampp/lampp security.do this when you are rooted and follow the interactive program to guide you set those credentials up.then you can restart the initialsetup process.hope this helps someone.
Sowmya Naidu Vundamati
I have installed OpenMRS standalone application. I tried connecting to mysql by doing the following (mentioned in the OpenMRS standalone documentation).:
-Go to the extracted standalone database/bin folder and execute this at the commandline: ./mysql -u openmrs -p
The problem is when I am tying the command : ./mysql -u openmrs -p
it shows the following error
./mysql is not recognized as an internal or external command.
I understand that this means that mysql did not get installed. But, it was mentioned in the documentation that OpenMRS standalone /application comes with embedded mysql.
How can I resolve this?
Thanks in advance!