Frequently Asked Questions - Database
To restore your Mifos database using the MySQL Query Browser and MySQL Administrator user interface:
- If Mifos is running, log out.
- In MySQL Query Browser, drop the Mifos database by right-clicking mifos and selecting Drop Schema.
- In MySQL Administrator, click Restore in the left pane.
- Click Open Backup File and select the backup you created.
- Keep the default settings and click Start Restore. Start Mifos and verify that the restored data is there.
To restore your Mifos database from the command line:
mysql –u root –p db_name < source_sql_file.sql
To backup your Mifos database using the MySQL Administrator user interface:
- In MySQL Administrator, click Backup in the left pane.
- Click New Project.
- Enter a name in the Project Name text box. For example, mifos_012009
- In the Schemata list, highlight the Mifos schema.
- Click the > arrow to put the data into the Backup Content area.
- Click Execute Backup Now.
- In the Save As dialog box, select where you want to save the backup.
To backup your Mifos database from the command line:
mysqldump —add-drop-table –u root –p db_name > target_sql_file.sql
For incremental backups, you can turn on the binary log, then do something like this monthly:
mysqldump -u root --single-transaction --create-options --flush-logs --flush-privileges --master-data=2--delete-master-logs --databases mifos mysql | gzip > /backups/full-`date -u +%Y-%m-%dT%H:%M:%SZ`.sql.gz
and something like this, every other day:
mysqladmin -u root flush-logs
This error message appears when:
- you are using the wrong database
- your database has been corrupted
- the database version is too old and Mifos can't figure out how to upgrade it
Make sure the correct databases are specified in your LocalPropertiesFile.
If your database has become corrupt, follow the installation documentation to manually re-create your database.
If your database version is too old, you may be able to download an older version of Mifos, upgrade using that, then use the more recent version of Mifos to upgrade again.
See DatabaseVersionPersistence.java in the Mifos source code for more information about what causes this error.
This error message appears when one or more of the following occurs:
- MySQL is not running.
- MySQL is listening on a different port than Mifos is expecting (by default, 3306).
- You are using an incorrect username or password for MySQL. Mifos assumes that your MySQL username is root and your password is mysql.
To check whether MySQL is running and listening on a certain port, enter telnet <hostname> <port> at a command prompt. For example:
telnet localhost 3306
If MySQL is running on the machine you specify and listening on the port number you entered, you will get a response that includes the server’s MySQL version number. For example:
5.0.67-community-nt- For information on how to start MySQL, see the topic Start/Stop Service in the MySQL Administrator online help.
- For information on how to customize your database connection – for example, by using a non-default user name and password or a port other than 3306 – see Customizing your Database Connection.

