Redis
SoftDB supports Redis with key browsing by type, database index switching (0-15), and a command interface that accepts any Redis command via the SQL editor.
Quick Setup
Section titled “Quick Setup”-
Open the Connection Hub and click New Connection.
-
Select Redis as the database type.
-
Fill in your connection details:
- Host:
localhost - Port:
6379 - Password: your Redis password (leave blank if none)
- Database: a number from
0to15(defaults to0)
- Host:
-
Click Test Connection, then Save.
Connection Settings
Section titled “Connection Settings”| Field | Default | Notes |
|---|---|---|
| Host | localhost | Redis server hostname or IP |
| Port | 6379 | Standard Redis port |
| Username | — | Optional. Used for Redis ACL (Redis 6+) |
| Password | — | Optional. Leave blank for unauthenticated servers |
| Database | 0 | Redis database index, 0-15 |
Key Browsing
Section titled “Key Browsing”SoftDB scans the selected database index using SCAN and lists up to 1,000 keys in the sidebar. Each key shows its type (string, hash, list, set, zset, stream). Clicking a key opens it in the table explorer.
The sidebar tree shows database indexes (0-15) as “databases”. Clicking a different index issues a SELECT command and refreshes the key list.
Data Type Support
Section titled “Data Type Support”SoftDB reads each key type using the appropriate Redis command:
| Type | Read Command | Display |
|---|---|---|
string | GET | Single value |
hash | HGETALL | Field-value pairs |
list | LRANGE 0 -1 | Ordered list with index |
set | SMEMBERS | Member list |
zset | ZRANGE 0 -1 WITHSCORES | Score-value pairs |
stream | XRANGE - + | Stream entries |
Key metadata shown in the column panel includes the TTL (in seconds, -1 means no expiry), encoding, and memory usage in bytes.
Running Commands
Section titled “Running Commands”The SQL editor accepts any Redis command in CLI syntax. Commands are space-separated tokens, just like redis-cli:
GET mykeySET session:user:42 "active" EX 3600HSET user:1 name "Alice" email "alice@example.com"ZADD leaderboard 1500 "player1" 1200 "player2"You can run multiple commands by putting each on its own line:
SET counter 0INCR counterINCR counterGET counterResults from multiple commands are merged into a single result set.
Useful commands
Section titled “Useful commands”# List all keys matching a patternKEYS user:*
# Get key typeTYPE mykey
# Check TTLTTL session:user:42
# Get server infoINFO server
# Get memory usageMEMORY USAGE mykey
# Flush current database (careful!)FLUSHDBLimitations
Section titled “Limitations”Redis is a key-value store, not a relational database. Several SoftDB features that work with SQL databases are not available for Redis:
| Feature | Available |
|---|---|
| SQL editor | Yes (Redis CLI syntax) |
| Key browsing | Yes |
| Database index switching | Yes |
| Structure designer | No |
| Export to CSV/JSON | No |
| Transactions (MULTI/EXEC) | No (via SoftDB UI) |
| Drop table / delete key | No (use DEL command) |
| Views / functions | No |
Troubleshooting
Section titled “Troubleshooting”Connection refused
Section titled “Connection refused”failed to ping redis: dial tcp 127.0.0.1:6379: connect: connection refusedRedis isn’t running. Start it with redis-server or systemctl start redis. Check the port in /etc/redis/redis.conf (port directive).
Authentication required
Section titled “Authentication required”failed to ping redis: NOAUTH Authentication requiredThe Redis server requires a password but none was provided. Add the password in the connection settings.
Wrong password
Section titled “Wrong password”failed to ping redis: ERR invalid passwordThe password is incorrect. Check the requirepass directive in your Redis config.
Invalid database index
Section titled “Invalid database index”failed to ping redis: ERR DB index is out of rangeThe database index must be between 0 and 15. Redis defaults to 16 databases (0-15). If your server has fewer, use a lower index.