2014-02-27 17:00:05 +01:00
|
|
|
# redis-cli
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
> Opens a connection to a Redis server.
|
2019-05-23 12:56:50 +02:00
|
|
|
> More information: <https://redis.io/topics/rediscli>.
|
2014-02-27 17:00:05 +01:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Connect to the local server:
|
2014-02-27 17:00:05 +01:00
|
|
|
|
|
|
|
`redis-cli`
|
|
|
|
|
2016-01-20 12:39:49 +01:00
|
|
|
- Connect to a remote server on the default port (6379):
|
2014-02-27 17:00:05 +01:00
|
|
|
|
|
|
|
`redis-cli -h {{host}}`
|
2016-01-20 12:39:49 +01:00
|
|
|
|
|
|
|
- Connect to a remote server specifying a port number:
|
|
|
|
|
2014-02-27 17:00:05 +01:00
|
|
|
`redis-cli -h {{host}} -p {{port}}`
|
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Specify a password:
|
2014-02-27 17:00:05 +01:00
|
|
|
|
2014-02-27 17:01:23 +01:00
|
|
|
`redis-cli -a {{password}}`
|
|
|
|
|
2016-01-16 15:12:05 +01:00
|
|
|
- Execute Redis command:
|
2014-02-27 17:01:23 +01:00
|
|
|
|
2016-07-22 22:24:06 +02:00
|
|
|
`redis-cli {{redis_command}}`
|