326 Star 1.6K Fork 345

GVPswoole / swoole-src

 / 详情

协程redis设置密码后连接不上,把密码去掉后就可以连接上了

Done
Opened this issue  
2018-07-16 16:58
on('request', function ($request, $response) { $options = [ 'timeout' => 1.5, 'password' => 'pBLysCu25gLlz1qt' ]; $redis = new Swoole\Coroutine\Redis($options); $res = $redis->connect('127.0.0.1', 6379); var_dump($res); $value = $redis->get($request->get['a']); $response->header("Content-Type", "text/plain"); $response->end($value); }); $http->start(); 打印出来的是1,修改redis.conf把密码去掉后,再次连接就可以。。?这是什么问题呢

Comments (1)

Darker created 任务

需要用 $redis->auth 方法

Rango Changed issue state to 已完成

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(2)
2048862 twose 1632723932 1217390 saltwaterroom 1578946511
C
1
https://gitee.com/swoole/swoole.git
git@gitee.com:swoole/swoole.git
swoole
swoole
swoole-src

Search