摘要: http://dev.mysql.com/doc/refman/5.1/en/alter-table.html添加索引ALTER table tab1 add key(或index) key_name (col1);添加前缀索引ALTER table tab1 add key(或index) key_name (col1(10)); 阅读全文
posted @ 2014-03-30 13:10 我就是熊吉 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 1,安装makecd srcmake install开启redis服务,如果要redis在后台运行,需要去redis.conf中配置daemonize 为yesredis-server /etc/redis.conf开启redis客户端redis-cli2,string字符串数据类型,键值对set 设置的时候会覆盖setnx 设置的时候不会覆盖set name gaoran设置键值对name=>gaoran,存在则覆盖setnx name gaoran,存在在返回0setex设置有效期setex haircolor 10 red,设置键值对haircolor=>color有效期为1 阅读全文
posted @ 2014-03-30 12:34 我就是熊吉 阅读(191) 评论(0) 推荐(0) 编辑