Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

MySQL Database Setup

vishwasbabu edited this page Mar 28, 2013 · 30 revisions

Database setup

Assuming you already have a version of MySql installed. To get started quickly you can just setup the latest demo database.

Mifos X has support for hosting multiple tenants so we use two database schemas:

  1. mifosplatform-tenants: which is responsible for persisting the tenant information which is used when deciding what schema each incoming request in the platform should route to.
  2. mifostenant-default: All tenant specific schemas follow the pattern mifostenant-xxxx, out of the box the default schema is used to represent a demo

Create schema/database named mifosplatform-tenants

create database `mifosplatform-tenants`;

Then apply file; mifosng-db/multi-tenant-demo-backups/0001-mifos-platform-shared-tenants.sql

mysql -u[user] -p[password] mifosplatform-tenants < mifosng-db/multi-tenant-demo-backups/0001-mifos-platform-shared-tenants.sql

Create schema/database named mifostenant-default

create database `mifostenant-default`;

Then apply the following files to this database;

mysql -u[user] -p[password] mifostenant-default < mifosng-db/0001a-mifosplatform-core-ddl-latest.sql mysql -u[user] -p[password] mifostenant-default < mifosng-db/0002-mifosx-base-reference-data-utf8 mysql -u[user] -p[password] mifostenant-default < mifosng-db/0003-mifosx-permissions-and-authorisation-utf8 mysql -u[user] -p[password] mifostenant-default < mifosng-db/0004-mifosx-core-reports-utf8

Important: If Using Different MySQL User/Password than what is configured

Note: By default, the files you clone from repository for setting up mysql and launching the application from the commad line assume a database user/password of root/mysql. Its likely that you have a different database user/password on your development machine so you should do the following:

  1. Update the schema settings associated with each entry in the mifosplatform-tenants database for example:

Example of updating tenant with id 1 to use mifos/mifos as username/password for database connections.

UPDATE mifosplatform-tenants.tenants SET schema_server = 'localhost', schema_server_port = '3306', schema_username = 'mifos', schema_password = 'mifos' WHERE id=1;

see Launching platform server locally from the command line for actions required for launching platform locally from the command line.

Clone this wiki locally