MongoDB pronlems for beginer

Hi guys!

I am a beginner developer and I have a some problem!
I need to use only mondodb as the main database. I tried many options.
But after executing the command yii migrate i always get the exceptions.

Please post these exceptions.

Exception 'yii\base\InvalidConfigException' with message 'Failed to instantiate
component or class "db".'

if i comment db section

Exception 'yii\base\InvalidConfigException' with message '"db" refers to a yii\mongodb\Connection component. yii\db\Connection is expected.'
if rename mongodb to db.

common\config\main-local.php


return [
‘components’ => [
// ‘db’ => [
// ‘class’ => ‘yii\db\Connection’,
// ‘dsn’ => ‘mysql:host=localhost;dbname=yii’,
// ‘username’ => ‘root’,
// ‘password’ => ‘’,
// ‘charset’ => ‘utf8’,
// ],
‘mongodb’ => [
‘class’ => ‘\yii\mongodb\Connection’,
‘dsn’ => ‘mongodb://@localhost:27017/yii’,
‘options’ => [
‘username’ => ‘’,
‘password’ => ‘’
]
],
‘mailer’ => [
‘class’ => ‘yii\swiftmailer\Mailer’,
‘viewPath’ => ‘@common/mail’,
// send all mails to a file by default. You have to set
// ‘useFileTransport’ to false and configure a transport
// for the mailer to send real emails.
‘useFileTransport’ => true,
],
],
];

Can you give a stacktrace for

Exception 'yii\base\InvalidConfigException' with 
message '"db" refers to a yii\mongodb\Connection
component. yii\db\Connection is expected.'

?