redis常用命令

1、清空数据:

  >flushall

2、修改set

  >set "1.0.0:PlayerData:id:63922" "{\"id\":63922,\"user_code\":\"1692495\",\"user_account\":\"wx_odjM21hfK5DpN3khdyitatrDI5yQ\",\"user_name\":\"\xe9\xa6\x99\xe6\xb0\xb4\xe7\x99\xbe\xe5\x90\x88\",\"user_pass\":\"a4873810abd8381c59d24123ad61f2f9\",\"head_url\":\"https://thirdwx.qlogo.cn/mmopen/vi_32/TAfQzsxtG1FAMFZJoYaTol1WPqibLDKFBeqGo4FfGVBEcy99I6P1heh7bYXFBibakDg8F8X8qkLwYqqeForiajsnw/132\",\"origin_head_url\":\"https://thirdwx.qlogo.cn/mmopen/vi_32/TAfQzsxtG1FAMFZJoYaTol1WPqibLDKFBeqGo4FfGVBEcy99I6P1heh7bYXFBibakDg8F8X8qkLwYqqeForiajsnw/132\",\"user_gold_3\":0,\"user_gold_red\":112000,\"user_jewel\":0,\"user_exp\":472,\"user_exp_vip\":0,\"vip_level\":9,\"recharge_total\":0,\"create_time\":\"2019-09-23T07:51:54.000Z\",\"update_time\":\"2019-09-23T09:00:00.313Z\",\"user_rate\":0,\"fire_level_current\":5,\"fire_level_max\":1,\"user_age\":0,\"user_friend_count\":0,\"user_constellation\":0,\"user_status\":0,\"user_sign\":\"\",\"user_sex\":2,\"imei\":\"869711047507530\",\"lottery_fish_count\":0,\"lottery_gold\":\"0\",\"user_red_packet_lottery_count\":0,\"channel_id\":100,\"terminal\":1,\"staff_id\":0,\"union_id\":\"odjM21hfK5DpN3khdyitatrDI5yQ\",\"red_packet_open_id\":0,\"certification\":0,\"adress_ip\":\"223.104.247.160\",\"is_guest\":0,\"referrer_id\":0,\"login_status\":0,\"login_counts\":0,\"login_times\":293,\"account_type\":0,\"user_gold_fish\":\"0\",\"user_gold_fish_time\":\"0\",\"user_gold_fish_level\":0,\"openinstall\":null,\"shop_ids\":\"\",\"gold_reward_each_period\":0,\"red_packet_reward_each_period\":0.3,\"gold_total\":112000,\"first_recharge\":0,\"little_try\":0,\"user_tel\":\"\",\"fire_index\":285,\"last_login_time\":1569229027,\"last_logout_time\":1569229200,\"is_new\":0,\"new_status\":2,\"fire_gold_total\":86000,\"fire_seat\":0}"

 

3、删除

  >del "1.0.0:PlayerData:id:63922"

 

4、命令行远程连接 redis 服务
    $ redis-cli -h host -p port -a password

你可能感兴趣的:(redis常用命令)