2014-02-27 20:00:05 +04:00
|
|
|
# redis-cli
|
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
> Opens a connection to a Redis server.
|
2014-02-27 20:00:05 +04:00
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
- Connect to the local server:
|
2014-02-27 20:00:05 +04:00
|
|
|
|
|
|
|
`redis-cli`
|
|
|
|
|
2016-01-20 14:39:49 +03:00
|
|
|
- Connect to a remote server on the default port (6379):
|
2014-02-27 20:00:05 +04:00
|
|
|
|
|
|
|
`redis-cli -h {{host}}`
|
2016-01-20 14:39:49 +03:00
|
|
|
|
|
|
|
- Connect to a remote server specifying a port number:
|
|
|
|
|
2014-02-27 20:00:05 +04:00
|
|
|
`redis-cli -h {{host}} -p {{port}}`
|
|
|
|
|
2016-01-07 20:31:27 +03:00
|
|
|
- Specify a password:
|
2014-02-27 20:00:05 +04:00
|
|
|
|
2014-02-27 20:01:23 +04:00
|
|
|
`redis-cli -a {{password}}`
|
|
|
|
|
2016-01-16 17:12:05 +03:00
|
|
|
- Execute Redis command:
|
2014-02-27 20:01:23 +04:00
|
|
|
|
2016-07-22 23:24:06 +03:00
|
|
|
`redis-cli {{redis_command}}`
|