188.8.131.52.3. Setting up a database connection in Yii 2
Attention!The connection will not work with localhost. The host address must be taken from the data to connect to the database.
Database connection data in Yii 2, the following are specified in the database settings configuration file:
- In case of using a file
config/db.phpyou need to change the lines:
'dsn' => 'mysql:host=host;dbname=base_data', 'username' => 'login', 'password' => 'password', 'charset' => 'utf8',
Changes can be made using filemanager or any FTPclient.