CDbException

CDbConnection failed to open the DB connection: SQLSTATE[HY000] [1044] Access denied for user 'brdepylaction_yii'@'localhost' to database 'brdepyla_blog'

/home/brdepylaction/yii-1.1.13.e9e4a0/framework/db/CDbConnection.php(381)

369                 throw new CDbException('CDbConnection.connectionString cannot be empty.');
370             try
371             {
372                 Yii::trace('Opening DB connection','system.db.CDbConnection');
373                 $this->_pdo=$this->createPdoInstance();
374                 $this->initConnection($this->_pdo);
375                 $this->_active=true;
376             }
377             catch(PDOException $e)
378             {
379                 if(YII_DEBUG)
380                 {
381                     throw new CDbException('CDbConnection failed to open the DB connection: '.
382                         $e->getMessage(),(int)$e->getCode(),$e->errorInfo);
383                 }
384                 else
385                 {
386                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
387                     throw new CDbException('CDbConnection failed to open the DB connection.',(int)$e->getCode(),$e->errorInfo);
388                 }
389             }
390         }
391     }
392 
393     /**

Stack Trace

#7
+
 /home/brdepylaction/public_html/site/protected/models/Categoria.php(50): CActiveRecord::model("Categoria")
45      * @param string $className active record class name.
46      * @return Categoria the static model class
47      */
48     public static function model($className=__CLASS__)
49     {
50         return parent::model($className);
51     }
52 
53     /**
54      * @return string the associated database table name
55      */
#8
+
 /home/brdepylaction/public_html/site/protected/controllers/ProdutosController.php(68): Categoria::model()
63             }
64         }
65 
66         if ($slug1 != "" && $slug2 != "") {
67 
68             $cat = Categoria::model()->findByAttributes(array('ctg_slug'=>$slug1));
69             $produto = Produto::model()->ativos()->findByAttributes(array('prd_slug'=>$slug2));
70 
71             if (is_null($cat) || is_null($produto)) {
72                 throw new CHttpException(404,'A página que você esta tentando acessar não existe.');
73             }
#18
+
 /home/brdepylaction/public_html/site/index.php(37): CApplication->run()
32 
33 require_once($yii);
34 
35 $config=dirname(__FILE__).'/protected/config/' . SERVER_ENV . '.php';
36 
37 Yii::createWebApplication($config)->run();
38 
39 ?>
2018-10-15 12:05:20 Apache Yii Framework/1.1.13