This module provides an easy way to install database. Things you can configure are:
Once you enter this data, script will first create database if it is not already present, save configuration to config file inside module config folder and run the selected sql file.
I know this could easily be achieved by command line, but this is a nice way to allow non-technical users an easier install of database and it's configuration.
Yii Framework 1.1.14
Sql file to create your database
First clone the repository on Github
git clone https://github.com/Pintar/yii-database-installer.git
Copy modules folder inside your projects protected folder.
Ensure that protected/modules/installer/config/params.php is writable. Add to protected/config/main.php the following:
'modules' => array( 'installer' => array( 'redirectUrl' => 'site/index', // controller action you want to redirect in case installation has been completed 'allowSqlUpload' => true, // set this to true if you want to manually upload sql file to run. Otherwise script will look in data folder of the module. ), ), 'db' => require(dirname(__FILE__).'/../modules/installer/config/params.php'),
Once you have installed the module, go to installer/install on your web browser and fill out the form.