![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
redis
文章平均质量分 65
majinbo111
这个作者很懒,什么都没留下…
展开
-
redis 启动,关闭,查看状态
查看redis本机的状态redis-cli -h 192.168.12.12 -p 6379 -a a603fd9c-f96a-43d9-8913-c49947ee14fe info Replication启动redis 服务sudo /usr/bin/redis-server /etc/redis/redis.conf以redis身份启动redis服务sudo -u redis /usr/bin原创 2016-02-14 14:27:47 · 36604 阅读 · 0 评论 -
Redis 正则匹配 key值
redis helpredis-cli --helpredis-cli 4.0.9 Usage: redis-cli [OPTIONS] [cmd [arg [arg ...]]] -h <hostname> Server hostname (default: 127.0.0.1). -p <port> Server port (...原创 2018-11-22 16:40:21 · 29339 阅读 · 2 评论 -
The difference between two redis connections in PHP
ContentconnectpconnectAdvantages of pconnectconnectThe life cycle of connect mode is only in the running PHP process, when the process ends, the connection is disconnected.pconnectThe lifecycle of...原创 2019-05-24 12:21:05 · 170 阅读 · 0 评论 -
redis-cli command exec
ContentHow to get redis-cli help?For examplesredis-cli --statredis-cli -r 1 config get maxclientsconfig get dirclient listinfo clientsconfig get saveHow to get redis-cli help?$ redis-cli -hredis-cl...原创 2019-05-21 14:55:49 · 816 阅读 · 0 评论 -
redis subscribe and publish
ContentTest with phpTest codeExecReferenceTest with phpTest code<?phpcount($argv) > 1 && $type = $argv[1];if ( $type == 'subscribe' ) { echo "subscribe\n"; $redis = ne...原创 2019-05-21 15:36:23 · 239 阅读 · 0 评论 -
Redis min-slaves-to-write
Redist 主从复制的时候,设置以下参数需小心,min-slaves-max-lag=10min-slaves-to-write=1当min-slaves-to-write=1时,slave去维护断开的情况下主库此时只能读,不能写:lpush lkey 1 2 3 4(error) NOREPLICAS Not enough good slaves to write.127.0.0...原创 2019-06-27 11:13:41 · 5424 阅读 · 0 评论