Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Described how to re-initialise OpenMRS

...

I have experienced this in two scenarios: during the initialisation of OpenMRS and when re-starting OpenMRS after it had successfully been initialised. The first scenario is what I have described as a bootstrapping problem above, it can be avoided by going offline during the initialisation. The second scenario is solved by changing 'localhost' to 127.0.0.1' in the openmrs-runtime.properties file.   

Re-running the initialisation
Before re-running the initialisation, I tidy up three things.
First, remove the OpenMRS database and the user openmrs_user.

Re-running the initialisation

Before re-running the initialisation, I tidy up three things.

First, remove the OpenMRS database and the user openmrs_user.

Code Block

~/Projects/OpenMRS/code/openmrs-core(master) $ mysql -u root -p -h localhost
Enter password:

mysql> drop database openmrs;
Query OK, 100 rows affected (0.56 sec)

mysql> use mysql;
Database changed

mysql> delete from user where user='openmrs_user';
Query OK, 1 row affected (0.01 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

Next, I remove the OpenMRS folder underneath my user.

Code Block

~ $ rm -rf ~/.OpenMRS

Done and dusted, OpenMRS can be re-initialised now.