Wednesday, January 14, 2015

Message CDbConnection failed to open the DB connection.



So what is CDbConnection failed to open the DB connection message mean?
You may see this visiting certain forums.


In our server file was already exists. No action has been executed.
You need to remove your previous files installations or configure env.php database settings


So even if your database "basic" in local MySQL exist, and you still have error 
Look in to console 
Check if  you setup your console properly? When you run composer install after installation it runs the composer callback hook, calling the console, thus its configuration.
Make sure it returns the correct configurations: https://...../config/console.php
I found that it was a driver issue, I just forgot to install php5-mysql in my debian box.

Also try to download basic from this website*, then unzip in to your root folder.
Use 
.....@.....-linux:/home/www-data/www/yiin1$ php composer.phar self-update
Updating to version a2a70380c14a20b3f611d849eae7342f2e35c763.
Should work 100%

Note! Before you run the installation script you need to setup the connection to the database for console app (check where to include that configuration)

*So who are they is development of your new Yii Web Framework projects. It generates projects boilerplates according to your needs and requirements. Please visit them


No comments:

Post a Comment