CDbException

CDbConnection не удалось открыть соединение с базой данных: SQLSTATE[HY000] [1044] Access denied for user 'vashtur_mysql'@'%' to database 'vashtur_db'

/home/vashtur/vashtur.ru/docs/framework/db/CDbConnection.php(348)

336                 throw new CDbException(Yii::t('yii','CDbConnection.connectionString cannot be empty.'));
337             try
338             {
339                 Yii::trace('Opening DB connection','system.db.CDbConnection');
340                 $this->_pdo=$this->createPdoInstance();
341                 $this->initConnection($this->_pdo);
342                 $this->_active=true;
343             }
344             catch(PDOException $e)
345             {
346                 if(YII_DEBUG)
347                 {
348                     throw new CDbException(Yii::t('yii','CDbConnection failed to open the DB connection: {error}',
349                         array('{error}'=>$e->getMessage())),(int)$e->getCode(),$e->errorInfo);
350                 }
351                 else
352                 {
353                     Yii::log($e->getMessage(),CLogger::LEVEL_ERROR,'exception.CDbException');
354                     throw new CDbException(Yii::t('yii','CDbConnection failed to open the DB connection.'),(int)$e->getCode(),$e->errorInfo);
355                 }
356             }
357         }
358     }
359 
360     /**

Stack Trace

#7
+
 /home/vashtur/vashtur.ru/docs/protected/models/Page.php(23): CActiveRecord::model("Page")
18      * Returns the static model of the specified AR class.
19      * @return Page the static model class
20      */
21     public static function model($className=__CLASS__)
22     {
23         return parent::model($className);
24     }
25 
26     /**
27      * @return string the associated database table name
28      */
#8
+
 /home/vashtur/vashtur.ru/docs/protected/views/search/index.php(1): Page::model()
1 <?php $model = Page::model()->findByPk("search")?>
2 <?php 
3     $this->pageTitle = $model->pagetitle?$model->pagetitle:$model->title;
4     if ($model->pagekeywords)
5         Yii::app()->clientScript->registerMetaTag($model->pagekeywords, 'keywords');
6     if ($model->pagedescription)
#13
+
 /home/vashtur/vashtur.ru/docs/protected/controllers/SearchController.php(6): CController->render("index")
1 <?php
2 class SearchController extends Controller
3 {
4     public function actionIndex()
5     {
6         $this->render('index');
7     }
8 }
2024-03-28 17:53:39 Apache/2.4.53 (Red Hat Enterprise Linux 8) PHP/5.6.40 Yii Framework/1.1.7