perl 操作redis 数据库 带用户名和密码验证,选择数据库0.1.2

来源:互联网 发布:linux 自动化测试 编辑:程序博客网 时间:2024/06/05 04:31
host_port=>'127.0.0.1:6379,127.0.0.1:6377',
dbcollections=>'rediscon111',
password=>'rooti',

dbname=>'0',    #redis的数据库名 0 ,1 ,2 

$redis = Redis->new(server => $host.':'.$port,name => $dbcollections,password => $password); 

my $chooseDb = $redis->select($dbname);
$data = $redis->get($key_value);



you can try this……

0 0
原创粉丝点击