redis

本文涉及的产品
云数据库 Redis 版,社区版 2GB
推荐场景:
搭建游戏排行榜
简介:

命令行直接连:

redis-cli -h host -a 6379:password

php扩展:

$redis = new Redis();
$redis->connect(host,6379);
$res = $redis->auth(password);

redis
<?php 
//Connecting to Redis server on localhost 
$redis = new Redis(); 
$redis->connect('host', 6379); 
echo "Connection to server sucessfully"; 
//check whether server is running or not echo "Server is running: "+ $redis->ping(); 
?>



     本文转自wsw26 51CTO博客,原文链接:http://blog.51cto.com/wsw26/2066341,如需转载请自行联系原作者



相关实践学习
基于Redis实现在线游戏积分排行榜
本场景将介绍如何基于Redis数据库实现在线游戏中的游戏玩家积分排行榜功能。
云数据库 Redis 版使用教程
云数据库Redis版是兼容Redis协议标准的、提供持久化的内存数据库服务,基于高可靠双机热备架构及可无缝扩展的集群架构,满足高读写性能场景及容量需弹性变配的业务需求。 产品详情:https://www.aliyun.com/product/kvstore &nbsp; &nbsp; ------------------------------------------------------------------------- 阿里云数据库体验:数据库上云实战 开发者云会免费提供一台带自建MySQL的源数据库&nbsp;ECS 实例和一台目标数据库&nbsp;RDS实例。跟着指引,您可以一步步实现将ECS自建数据库迁移到目标数据库RDS。 点击下方链接,领取免费ECS&amp;RDS资源,30分钟完成数据库上云实战!https://developer.aliyun.com/adc/scenario/51eefbd1894e42f6bb9acacadd3f9121?spm=a2c6h.13788135.J_3257954370.9.4ba85f24utseFl
相关文章
|
1月前
|
存储 NoSQL Go
Redis 双端链表
Redis 双端链表
26 0
|
6月前
|
存储 缓存 NoSQL
Redis
Redis
34 0
|
8月前
|
存储 NoSQL Java
Redis3
Redis3
38 0
|
7月前
|
NoSQL Redis
|
8月前
|
运维 NoSQL Shell
redis-2
redis-2
50 0
|
8月前
|
存储 缓存 NoSQL
Redis5
Redis5
101 0
|
8月前
|
NoSQL Java Redis
Redis4
Redis4
29 0
|
8月前
|
存储 消息中间件 缓存
了解redis
了解redis
49 0
|
11月前
|
存储 SQL 缓存
|
存储 缓存 监控
Redis应用问题解决
key对应的数据在数据源并不存在,每次针对此key的请求从缓存获取不到,请求都会压到数据源,从而可能压垮数据源。比如用一个不存在的用户id获取用户信息,不论缓存还是数据库都没有,若黑客利用此漏洞进行攻击可能压垮数据库。
Redis应用问题解决