My Google+ Profile

Monday 30 July 2012

Use single(common) database in development environment Yii framework.

Please follow following steps:

step 1 : Add new user in your mysql database privileges options. You will get following window to add new user.







step 2 : Make following changes in mysql config file name my.conf(Ubuntu OS).

    From :
    bind-address           = 127.0.0.1

    To:
    bind-address           = *

    NOTE : my.conf file exist in ubuntu at this location : /etc/mysql/my.cnf

step 3 : Finally restart mysql service by following ubuntu command.
  
    /etc/init.d/mysql restart

step 4 : Make following changes in config.php file

        'db'=>array(
            'connectionString' => 'mysql:host=NETWORK_DESKTOP_IP;dbname=DATABASE_NAME',
            'emulatePrepare' => true,
            'username' => 'USERNAME',
            'password' => 'PASSWORD',
            'charset' => 'utf8',
        ),