redis 生成测试数据

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

你可能感兴趣的:(nosql-redis)