Using module db and activerecord

Hi, i am using the application in yii3, it works fine, but you still can not use the db module and activate record, you have to make an additional configuration to make it work,

params.php

return [
	'db.dsn'        => 'mysql:host=127.0.0.1;dbname=app_web;charset=utf8',
	'db.username'   => 'admin',
	'db.password'   => 'admin',
	'db.enableSchemaCache' => true,
];

Thks,

1 Like

The great spirit. After setting up the DB configuration like this, what else do you need to do to connect to the database?