Install and Configure MySQL
- Download mySQL Community Edition 5.1 and save to Mifos Install (choose Windows Essentials 32-bit version with MSI Installer)

- Double click the downloaded file to begin running the Installer. Select Typical installation and click Next.

- Click Install.

-
Continue clicking Next as prompted.

- Select Configure the MySQL Server now and click Finish.

- Click Next and then select Detailed Configuration for Instance Configuration Wizard and click Next.


- Keep the selection for Developer Machine Under Server Type and click Next.

-
Select Multifunctional Database for Database Usage and click Next.

- Select C: Installation Path for InnoDB Tablespace Settings and click Next.

- Select Decision Support (DSS)/OLAP for Number of Concurrent Users and click Next.

- Select Enable TCP/IP Networking, choose Port Number: 3306, select Enable Strict Mode and click Next.

- Select Best Support for Multilingualism for Default Character Set.

-
Install as Windows Service. Check to included bin directory in Windows PATH.

- Set up your root password under security options. Select Modify Security Settings. Enter your root password and confirm it. You can leave the password as its default, mysql, if you like. Please note if you make any changes.

*If you'd previously installed a Mifos database, your window will look like this and you'll need to enter your current root password.

- Press Execute to start configuration.

-
Once all configuration settings have been successfully applied, click Finish to close the Wizard.

Go back to top of the page.
Configure MySQL
Configuring MySQL can be done in a number of different ways:
-
By directly editing values in the my.ini file.
-
Using MySQL GUI Tools or MySQL Workbench
-
Using MySQL Workbench
In this example, we're going to configure the MySQL database by directly editing the my.ini file. MySQL GUI Tools have been phased out and MySQL Workbench can be used if you're administering multiple databases.
Configuration by directly editing my.ini file
-
Locate your my.ini file in the folder where MySQL Server has been installed. My location is: C:\Program Files\MySQL\MySQL Server 5.1

- Open this file to edit it in a text editor like Notepad.
- There are six parameters we'll configure:
max_connections=300
innodb_buffer_pool_size=1024M
innodb_file_per_table
log-error=mysql_error.log
log-slow-queries=mysql_slow_query.log
long_query_time=1-
Search for max_connections and edit the value to 300.

- Search for innodb_buffer_pool_size and edit the value to be set to 1024M
-
Scroll to the bottom of the file and enter the following 4 entries on separate lines:
- innodb_file_per_table
- long_query_time = 1
- log-error = mysql_error.log
- log-slow-queries = mysql_slow_query.log

- Save changes and close out the my.ini file. Open up the file one more time to ensure the changes were saved.
Go back to top of the page.
Create Mifos Database and Mifos User
- Enter the DOS command line. This can be done by entering cmd in the Run window.
-
Log in to MySQL using root account. By default password will be mysql unless you changed it while installing MySQL.
- To log in, type:
mysql -uroot -p
-
- Press enter and you'll be prompted for your password (this is the password you set defined for root while configuring MySQL).

-
- Once successfully logged in, you should see a screen as follows:
-
Now let's enter the first command to create the database called mifos.
- Type the following and press enter (make sure to include semi-colons):
CREATE DATABASE mifos;
-
- You should see a message that states Query OK, 1 row affected... To confirm the database was successfully created, type the following and press enter:
show databases;
-
Now let's create the user, mifos, its password, and grant it necessary privileges.
- The password is determined by the string that follows identified by. For this example, I've made my password nonsecure but you should choose a secure password. All commands would be different according to which password you select. So the command works like this: GRANT ALL on '<DATABASE NAME>'.* to '<USER ID>'@'<HOST NAME>' identified by '<PASSWORD>';
- Type the following (making necessary change for your password after "identified by") and press enter:
GRANT ALL on mifos.* to 'mifos'@'localhost' identified by '<PASSWORD>';

-
- Execute this last command to complete the user creation process. Type the following and press enter:
FLUSH PRIVILEGES;
-
- Now let's exit out of MySQL command line by typing exit and pressing enter.

Initiate MySQL
Next we need to initialize the Mifos database, by running the three commands below from the directory that contains this INSTALL file. These commands assume a database username of "mifos" and in my case I'm using the password "nonsecure". Adjust them if your database password is different.
mysql -D mifos -u mifos -p<PASSWORD> < db/sql/base-schema.sql mysql -D mifos -u mifos -p<PASSWORD> < db/sql/base-data.sql mysql -D mifos -u mifos -p<PASSWORD> < db/sql/init_mifos_password.sql
We're still in the DOS command line but will need to cd (change directory) into the directory that contains the INSTALL file. In my case this was Mifos Install.
- Execute the first command (you'll know the command is successfully executed when the command line prompt appears again below). Replace <PASSWORD> with your password:
mysql -D mifos -u mifos -p<PASSWORD> < db/sql/base-schema.sql
- Execute the second command:
mysql -D mifos -u mifos -p<PASSWORD> < db/sql/base-data.sql
- Execute the third command:
mysql -D mifos -u mifos -p<PASSWORD> < db/sql/init_mifos_password.sql
- You can now exit out of the command line window by clicking x.
Update local.properties file if you changed mysql password for user id mifos.
- In my example, I used the password of nonsecure for my mysql database. By default, Mifos expects a database called Mifos with the user id of mifos and password mifos. Since I set my password to to mysql to a different one, unique from mifos, you'll need to customize your local.properties file to specify this new password.
- Open your local.properties file. It is located in the config folder which is in the same directory where INSTALL is located.
- Highlight the current password of mifos and replace it with your actual password. Save the changes.
Go back to top of the page.













