Manage cookies that are used for advertising, such as ad personalization, remarketing, and ad effectiveness analysis.
2.8.4.3.2. Configure database connection in Yii
Attention!
The connection will not work with the localhost host. The host address must be taken from the database connection credentials.Database connection details in Yii are specified in the app's configuration file. Depending on the structure of the configuration files, changes must be made to the file containing the database settings:
- If you are using the file
protected/config/main.php, you need to modify the following lines:'connectionString' => 'mysql:host=host;dbname=database', 'username' => 'login', 'password' => 'password', - If the file
protected/config/main.phpcontains a line similar to the following, for example:'connectionString'=>'mysql:/home/example/example.com/www/protected/data/filename.db',Changes must be made directly to the file specified in this line. In this example, it is
/home/example/example.com/www/protected/data/filename.db.
Changes can be made using the file manager or any FTP client.