-
Notifications
You must be signed in to change notification settings - Fork 749
MySQL 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:
- 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.
- 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 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 database `mifostenant-default`;
Then apply file; mifosng-db/multi-tenant-demo-backups/mifostenant-default.backup.sql to this database;
mysql -u[user] -p[password] mifostenant-default < mifosng-db/multi-tenant-demo-backups/bk_mifostenant-default.sql
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:
- 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.