CDbConnection failed to open the DB connection. (phpunit)

Well after 2 days of scratching head…Its better I ask.

I was developing my "trackstar" application in windows (XAMPP) but 2 days ago changed to Ubuntu (LAMPP).

I have moved the files and framework and imported the databases. Everythings works fine (except for phpunit).

below is my config/main.php db string


		

		'db'=>array(

			'connectionString' => 'mysql:host=localhost;dbname=trackstar',

			'emulatePrepare' => true,

			'username' => 'root',

			'password' => 'password_removed',

			'charset' => 'utf8',

		),



config/test.php:


		

		'db'=>array(

			'connectionString' => 'mysql:host=localhost;dbname=trackstar_test',

			'emulatePrepare' => true,

			'username' => 'root',

			'password' => 'password_removed',

			'charset' => 'utf8',

		),



Works fine (because the app can login (via db).

but when i try to run a unit test using phpunit (cli) i get this error:




CDbException: CDbConnection failed to open the DB connection.


/opt/lampp/htdocs/trackstar/framework/db/CDbConnection.php:370

/opt/lampp/htdocs/trackstar/framework/db/CDbConnection.php:313

/opt/lampp/htdocs/trackstar/framework/db/CDbConnection.php:291

/opt/lampp/htdocs/trackstar/framework/base/CModule.php:372

/opt/lampp/htdocs/trackstar/framework/test/CDbFixtureManager.php:96

/opt/lampp/htdocs/trackstar/framework/test/CDbFixtureManager.php:232

/opt/lampp/htdocs/trackstar/framework/test/CDbFixtureManager.php:113

/opt/lampp/htdocs/trackstar/framework/test/CDbFixtureManager.php:85

/opt/lampp/htdocs/trackstar/framework/base/CModule.php:372

/opt/lampp/htdocs/trackstar/framework/test/CDbTestCase.php:84

/opt/lampp/htdocs/trackstar/framework/test/CDbTestCase.php:116




Please any help would be greatly appreciated.

Could you paste here protected/tests/bootstrap.php ?

yeah please share some bootstrap initialization…