when I upload my files from localhost to the online server, then I get the following cdbexception message when I try to login using admin/admin values for user and password:
CDbException
CDbConnection failed to open the DB connection: SQLSTATE[28000] [1045] Access denied for user ‘root’@‘localhost’ (using password: YES)
/home/userid/public_html/d/webroot-directory/yii/framework/db/CDbConnection.php(364)
throw new CDbException(Yii::t(‘yii’,‘CDbConnection.connectionString cannot be empty.’));
353 try
354 {
355 Yii::trace(‘Opening DB connection’,‘system.db.CDbConnection’);
356 $this->_pdo=$this->createPdoInstance();
357 $this->initConnection($this->_pdo);
358 $this->_active=true;
359 }
360 catch(PDOException $e)
361 {
362 if(YII_DEBUG)
363 {
364 throw new CDbException(Yii::t(‘yii’,‘CDbConnection failed to open the DB connection: {error}’,
365 array(’{error}’=>$e->getMessage())),(int)$e->getCode(),$e->errorInfo);
366 }
367 else
368 {
369 Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,‘exception.CDbException’);
370 throw new CDbException(Yii::t(‘yii’,‘CDbConnection failed to open the DB connection.’),(int)$e->getCode(),$e->errorInfo);
371 }
372 }
373 }
374 }
375
376 /**
what could be the reason.It works fine on localhost.