redis cluster 只有 0號數據庫.
redis-cli debug
# redis-cli -c -h 192.168.56.88 -p 7000
127.0.0.1:7000> debug populate 10000
或者
# redis-cli -c -h 192.168.56.88 -p 7000 debug populate 10000
shell
# vi /tmp/test.sh
#!/bin/bash
for i in {1..10000}
do
echo "key${i} ${i}"
redis-cli -c -h 192.168.56.88 -p 7000 set key${i} ${i}
done
參考:
https://blog.csdn.net/babyfish13/article/details/52981110