D
D
damn2019-07-22 13:40:44
Yii
damn, 2019-07-22 13:40:44

Error CDbConnection failed to open the DB connection. What to do?

The bottom line is that everything worked well for me on the local server, there was no such error. When I uploaded it to the hosting, I got the error CDbConnection failed to open the DB connection. I've been suffering for 2 days now. I even tried uploading to another hosting, everything is clear. Everything was fine with the connection, everything worked fine on the local server. I don’t even know what to do. PHP version 7.1. Tried even with 5.4

'db' => array(
      'connectionString' => 'mysql:host=localhost;dbname=*****',
      'emulatePrepare' => true,
      'username' => '*******',
      'password' => '******',
      'charset' => 'utf8',
      'tablePrefix' => 'om_', 
    ),

All data is correct

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question