Skip to content

Instantly share code, notes, and snippets.

@vinayvenu
Created March 25, 2021 05:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vinayvenu/06dd7b9b670b7283fadd144af05f7406 to your computer and use it in GitHub Desktop.
Save vinayvenu/06dd7b9b670b7283fadd144af05f7406 to your computer and use it in GitHub Desktop.
Set up Bahmni reports
### This gist provides the details of fixing bahmni-reports once you have installed Bahmni.
The reports database requires a bunch of tables required by the scheduler. Even if you don't run the scheduler, the database is required for bahmni-reports to run.
### Symptoms
Go to reports, and click on a report. It take a lot of time, and ends up throwing an exception
Missing database exception on /var/log/bahmni-reports
### Solution
Create the database and the required tables.
mysql -uroot -p
create user 'reports-user' identified by 'password'; -- or whatever value set up as password on bahmni-installer
create database bahmni_reports;
use bahmni_reports;
grant all privileges on bahmni_reports to 'reports-user';
\q
curl https://raw.githubusercontent.com/Bahmni/bahmni-reports/master/src/main/resources/sql/quartz/tables_mysql_innodb.sql > ~/reports_db.sql
mysql -ureports-user -p bahmni_reports < ~/reports_db.sql
sudo systemctl restart bahmni-reports
Now go and verify that the reports are running fine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment