Run a raw command
Type a command the way redis-cli would, and know which commands the Console forwards.
In short
The Console runs a Redis command the way redis-cli would, for what the Keys tab has no button for. Every line is classified first: reads go anywhere, writes only to a writable connection, and dangerous commands never.
Before you start
- Who: the Console is for people who work on the connection (Edit). Reads work anywhere; writes need a writable connection.
- Plan: a write counts as one command against your plan. Reads are free.
- First: choose the connection and database in the header.
Run a command
- Select a connection and the database in the header, then open the "Console" tab.
- Type a command, for example HGETALL user:42 or TTL session:abc, and press Enter or "Run".
- Read the reply and how long the server took.
- Press the up and down arrow keys to recall earlier lines. Nothing is kept once you leave the tab.
What is forwarded and what is refused
Good to know
- Whitespace separates parts and quotes group them: SET greeting "hello world" sends three parts.
- SELECT is never forwarded: the database comes from the header picker, and the prompt shows the active one.
- Use SCAN 0 MATCH pattern COUNT 100 where you would use KEYS.
- (error) WRONGTYPE means the key holds another type than the command expects; TYPE keyname tells you which. (empty) means the command succeeded and returned nothing.
- A reply longer than 256 KB is cut, and a note under it says so. Narrow the command - a COUNT, a range or a SCAN - to see the rest.
- Commands with subcommands, such as CLUSTER, CLIENT or MEMORY, count as reads only for their reading subcommands (CLUSTER INFO, CLIENT LIST, MEMORY USAGE). Any other subcommand - CLUSTER SAVECONFIG, for example - counts as a write, so a read-only or Production connection refuses it.
- On a Production connection every command is recorded in the audit trail, reads included.
A raw write has no confirmation It takes effect the moment you press Enter. DEL user:* deletes a key literally named user:*, since patterns do not expand. Read the line back before you run it, and prefer the Keys tab for edits that deserve a dialog.
If something goes wrong
- "Unterminated quote.": close the quote. A quote left open is refused before it is sent.
- "… writes, and this connection is read-only.": the write is recorded as Refused.
- "Blocking reads are not available from the console."
- "A command takes at most … arguments - split it into several commands."
Related
- /help/cache-tester/read-the-audit-trail
- /help/cache-tester/edit-a-key
- /help/cache-tester/connection-tiers