Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


This page lists details on how to connect to various databases in Bahmni.

Bahmni comprises of different sub-components, like OpenMRS, OpenELIS, OpenERP/Odoo, Dcm4chee, PACS-Integration service, etc. Each component talks to its own database, which may be created within MySQL or Postgres. To see the contents of a particular database, you will need to use the right command line tool for MySQL or Postgres, and also appropriate credentials. 

titleMySQL Database Server

For MySQL Databases, the mysql command is used to connect to mysql databases, and view tables and data. Please refer to this resource to see all the commonly used MySQL Commands: MySQL Cheatsheet 

Note: If you are connecting to MySQL running inside a Vagrant Box (or a VM) from your host machine, you will need to connect to IP: and port: 3306.

titlePostgreSQL Databases

For PostgreSQL Databases, the psql command is used to connect to PostgreSQL databases, and view tables and data. Please refer to this resource to see all the commonly used commands: PostgreSQL DB Administration Commands. If you want to use a graphical GUI tool for psql, then you can try out PgAdmin.

To connect to PostgreSQL DB as admin, and alter databases, or drop them use the command: "psql -Upostgres".

Note: If you are connecting to PostgreSQL running inside a Vagrant Box (or a VM), you may need to refer to this for ensuring the proper ports are open, in case you aren't able to connect from host machine:

titleSSH Tunnel for Postgres / MySql DB

You can also try using the SSH Tunnelling connection options for connecting to databases. More details here. Sample screenshot here:

List of Application Databases


The connection credentials shown here are the default. These may have been modified during installation by the Administrator.

ApplicationDB Server TypeDatabase NameConnection Command
1.OpenMRS (EMR)MySQLopenmrs

Code Block
> mysql -uopenmrs-user -ppassword openmrs

For Bahmni 0.92 -
> mysql -uroot -pP@ssw0rd openmrs

2.OpenELIS (Lab)PostgreSQLclinlims

Code Block
> psql -Uclinlims clinlims


Code Block
> psql -Uopenerp openerp
> psql -Uodoo odoo


Code Block
> psql -Upostgres pacsdb

5.PACS Integration ServicePostgreSQLbahmni_pacs

Code Block
> psql -Upostgres bahmni_pacs

titleOn this page

Table of Contents

titleRelated Links

Anonymizing Bahmni Database