Cdb Exception Error (Please Help)

Good Day All,

I am new to yii and i am having a problem.

I know that there are different varieties of this problem being reported but i think my case is unique.

Recently the server that had the yii application crashed. As a result i now have to move the application to another server. I moved the web folder where the yii application was and also the db. When i tried to go to the site i received the following error:

[color="#9ACD32"][color="#800080"]CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘test.translation’ doesn’t exist. The SQL statement executed was: select message, translation from translation where language = :language and category = :category


504 return $result;

505 }

506 catch(Exception $e)

507 {

508 if($this->_connection->enableProfiling)

509 Yii::endProfile(‘system.db.CDbCommand.query(’.$this->getText().$par.’)’,‘system.db.CDbCommand.query’);

510 $errorInfo = $e instanceof PDOException ? $e->errorInfo : null;

511 $message = $e->getMessage();

512 Yii::log(Yii::t(‘yii’,‘CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.’,

513 array(’{method}’=>$method, ‘{error}’=>$message, ‘{sql}’=>$this->getText().$par)),CLogger::LEVEL_ERROR,‘system.db.CDbCommand’);

514 if(YII_DEBUG)

515 $message .= '. The SQL statement executed was: '.$this->getText().$par;

516 throw new CDbException(Yii::t(‘yii’,‘CDbCommand failed to execute the SQL statement: {error}’,

517 array(’{error}’=>$message)),(int)$e->getCode(),$errorInfo);

518 }

519 }


521 /**

522 * Builds a SQL SELECT statement from the given query specification.

523 * @param array $query the query specification in name-value pairs. The following

524 * query options are supported: {@link select}, {@link distinct}, {@link from},

525 * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},

526 * {@link limit}, {@link offset} and {@link union}.

527 * @return string the SQL statement

528 * @since 1.1.6


When i check the forums the main thing is that the particular table doesnt exist. On checking my db, the table does indeed not exist. My question is now, what can i do to resolve the issue? This db was a backup of a functioning db and i dont think i have another backup.

Any help is greatly appreciated.

Best Regards

What database are you using? Have you deleted the table? If not, it may be corrupted.

For windows OS try to execute Drive:/path/to/mysql/bin/mysql_upgrade.exe.

For linux OS try to execute /path/to/mysql/bin/mysql_upgrade.

it was a mysql db…i moved the application from a fedora 64 bit server to another fedora 64 bit server.

I dont see the test.translation table. However i see the translation table.