Help › Connect to databases
Connect to Redis
Connect to Redis, Valkey, KeyDB or Dragonfly, a single server or a cluster, with a password or an ACL user and TLS, through any route.
Querlyn 0.1.0 is not released yet. This help describes it ahead of release.
Querlyn talks to Redis with Redis's own protocol, through the same routes as any other database: directly, through SSH, Kubernetes or AWS Systems Manager. A Redis connection is a server of keys: the sidebar lists its numbered databases, a database opens in a keys tab where you browse its keys and read their values (see Browse the keys of a Redis database), and a query tab takes Redis commands instead of SQL (see Run Redis commands in a query tab).
What you need
- Redis 4.0 or later, or a server that speaks its protocol: Valkey, KeyDB or Dragonfly. Querlyn names the server by what it is.
- The server's host and port (6379 unless it says otherwise).
- The password when the server asks for one, and the user's name when the server has ACL users.
Fill in the dialog
- Choose and, under Database engine, Redis (under Key-value), or Valkey, KeyDB or Dragonfly below it.
- Fill in Host and Port.
- Database number is the numbered database query tabs start in. Leave it empty for database 0. A cluster has only database 0.
- User may stay empty: a server with only a password signs in its default user. Fill it in for a server with ACL users.
- Choose where the password is kept; see Choose where passwords are kept.
- Under TLS, choose as for any database; see Encrypt a connection. A Redis server speaks TLS on a port of its own, so set the port to the server's TLS port. With Prefer, Querlyn first asks whether the port answers without TLS and uses TLS when it does not.
- Optionally, Client certificate: a PEM file holding a certificate and its private key, not encrypted, for servers that require client certificates. Querlyn reads it at each connect and keeps only its path.
- For a cluster whose nodes announce addresses your computer cannot reach, fill in Node address map; see Clusters below.
- Choose Test Connection, then Save & Connect.
A Redis URL fills the dialog in too: redis://user@host:6379/0, or
rediss:// for TLS. See Paste a connection URL.
What the sidebar shows
Under the connection, Databases lists the numbered databases that hold keys, each with how many, and the database the connection starts in. Double-click one, or choose , to open its keys tab. Keys are not listed in the sidebar: a server can hold millions.
Clusters
Name any node of a Redis Cluster as the host. Querlyn sees that the server is a cluster, asks it which node serves which keys, and connects to the other nodes when it first needs them: through the connection's route, with the same TLS settings, user and password. The connection's details say how many primaries and replicas the cluster has.
- A key's commands go to the node that holds it. The keys tab and a query tab both work on the whole cluster. When the cluster moves keys between nodes, Querlyn follows where the cluster sends a command, up to five times for one command.
- A command without a key (
INFO,DBSIZE,SCAN,FLUSHALL) goes to the node the connection names, and its result says which node answered. See Run Redis commands in a query tab. - The statement console names the node each command went to, on a line under the command.
- A node that cannot be reached does not end the connection. The keys tab names it and lists the other nodes' keys, and a command for one of its keys fails with the node's address.
- A cluster has only database 0.
Nodes at addresses you cannot reach
A cluster tells its clients where its nodes are, by the addresses the nodes announce. A cluster in Docker or Kubernetes, or behind address translation, announces addresses that work inside its network and not from your computer. An SSH, Kubernetes or Systems Manager route into that network reaches them as they are. Without one, Node address map says where each node is reached instead:
10.0.0.5:6379=localhost:16379, 10.0.0.6:6379=localhost:16380
Each entry is the address a node announces, =, and the address that
reaches it, both with their ports. Separate entries with commas or line
breaks. Only the addresses you list change, and an entry matches one
address exactly. With TLS, Querlyn still checks the certificate against
the name the node announces. The statement console says where each mapped
connection went.
The node the connection names needs no entry. An error about a node that could not be reached offers Add to Node Address Map, which opens the connection's settings with that node's address filled in.
Replicas and Sentinel
- A replica of a single server refuses changes; the keys tab says that the server is one.
- A Sentinel holds no keys, and Querlyn does not ask one where the primary is: connect to the primary itself.
What does not apply to Redis
Redis has no tables, so the features that work on tables and write SQL are off: the table designer, compare, import, Explain, Dry Run, backup and the others; see What works on each database. There are no transactions to roll back: every command takes effect when it runs.
Help for Querlyn 0.1.0. All help topics