温馨提示×

连接redis时-h后面的参数什么意思

小新
846
2020-12-08 11:21:09
栏目: 云计算

连接redis时-h后面的参数指的是:IP地址。

连接redis时-h后面的参数什么意思

连接redis时-h后面的参数指的是IP地址。格式所示:

redis-cli -h{ip} -p{port} -a{password} --stat


连接示例:

$ redis-cli -h 127.0.0.1 -p 6379 -a xttblog --stat

Warning: Using a password with '-a' option on the command line interface may not be safe.

------- data ------ --------------------- load -------------------- - child -

keys mem clients blocked requests connections

506 1015.00K 1 0 24 (+0) 7

506 1015.00K 1 0 25 (+1) 7

506 3.40M 51 0 60461 (+60436) 57

506 3.40M 51 0 146425 (+85964) 107

507 3.40M 51 0 233844 (+87419) 157

507 3.40M 51 0 321715 (+87871) 207

508 3.40M 51 0 408642 (+86927) 257

508 3.40M 51 0 497038 (+88396) 257

0