'yii\db\Connection', 'dsn' => 'mysql:host=127.0.0.1;dbname=t-smart_db', 'username' => 'root', 'password' => 'Zhoundlee@2019', 'charset' => 'utf8', ]; // 配置为本地安装的redis数据库 $config['components']['redis'] = [ 'class' => 'yii\redis\Connection', 'hostname' => 'localhost', 'port' => 6379, 'database' => 0, ]; return $config;