yiisoft / yii2-redis

Yii 2 Redis extension.
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
452 stars 183 forks source link

config 'database' does not work #209

Closed DesRodman closed 4 years ago

DesRodman commented 4 years ago

Hello team

I have next config

 'components' => [
        'redis' => [
            'class' => 'yii\redis\Connection',
            'hostname' => 'localhost',
            'port' => 6379,
            'database' => 2,
        ],

and also i set different volume for param database, but anyway all data writes to a db0 (https://prnt.sc/rw3piq)

maybe i need to set number of database more in another place? or where my mistake?

Thanks

samdark commented 4 years ago

That's weird. Can you debug Connection::open() method? According to code and tests it should properly select database.

DesRodman commented 4 years ago

Made debug and it works... Sorry, but looks like i copied source code from samples with unlegal symbols