[nodeJS]redis设置密码及nodejs带密码连接
redis 默认不需要密码即可访问,黑客直接访问即可获取数据库中所有信息,造成严重的信息泄露。 修复方案: 1、绑定需要访问数据库的IP 修改 redis.conf 中的 “bind 127.0.0.1” ,改成需要访问此数据库的IP地址。 2、设置访问密码 在 redis.conf 中找到“requirepass”字段,在后面填上你需要的密码。 注:上述两种方法修改后,需要重启redis才能生效。 nodejs带密码连接:(片段) args = [port, host, {auth_pass:pass}]; app....标签: nodeJS
[MySQL]分页查询的三种方式
SQL中分页查询的方式,记录一下。方式有三种,各自特点就不说了。 CREATE TABLE 收藏表( `id` bigint(20) unsigned NOT NULL auto_increment COMMENT 'primary key', `uid` bigint(20) unsigned NOT NULL default 0 COMMENT 'uid',<br> `status` tinyint(3) un...标签: MySQL
[ubuntu]How to use xtensa gcc
If you want to use xtensa-lx106-elf.tar.bz2 directly, you need only two steps: (1) tar jxcv xtensa-lx106-elf.tar.bz2 –C /opt (2) export PATH=/opt/xtensa-lx106-elf/bin:$PATH or add it to the end of .bashrc or .profile标签: ubuntu
[ubuntu]How to start github
Install git: apt-get install git Create a account: Visit github.com, register a account. Create a project in github.com. Create a new repository on the command line: git config --user.name=*** git config --user.email=***@anycle.com ...标签: ubuntu
[MySQL]MySQL联合查询语法内联、左联、右联、全联
MySQL联合查询效率较高,以下例子来说明联合查询(内联、左联、右联、全联)的好处: T1表结构(用户名,密码) userid(int) usernamevarchar(20) passwordvarchar(20) 1 jack jackpwd 2 owen owenpwd T2表结构(用户名,密码) userid(int)  ...标签: MySQL
[JS]How to get url params
How to get url params? function GetUrlParams(){ var args=new Object(); var query=location.search.substring(1); var pairs=query.split("&"); for(var i=0;i<pa...标签: JS
[JS] How to jump to an anchor slowly
How to jump to an anchor slowly? function goto(id){ var top = jQuery("#"+id).offset().top; jQuery("html,body").animate({scrollTop:top},1000); }标签: JS
[PHP]html标签与实体之间互换
PHP中的几个函数,实现实体与标签之间的互换。记录一下,具体用法就不贴了。 htmlspecialchars_decode() 函数把预定义的 HTML 实体转换为字符。 会被解码的 HTML 实体是: & 解码成 & (和号) " 解码成 " (双引号) ' 解码成 ' (单引号) < 解码成 < (小于) > 解码成 > (大于) htmlspecialchars_decode() 函数是 htmlspecialchars() 函数的反函数。 html_entity_decode() 函...标签: php
[ubuntu]Set swap file on ubuntu12.04
Creating the Swap File # dd if=/dev/zero of=/swapfile bs=1024 count=512000 512000+0 records in 512000+0 records out 524288000 bytes (524 MB) copied, 10.411 s, 50.4 MB/s # mkswap /swapfile Setting up swapspace version 1, size = 511996 KiB no label, UUID=7baa7ca8-c840-4c6e-bd53-038ce4e9a477 ...标签: ubuntu
[ubuntu]ubuntu 12.04 install redis
1.Install redis $ wget http://download.redis.io/releases/redis-2.8.3.tar.gz $ tar xzf redis-2.8.3.tar.gz $ cd redis-2.8.3 $ make $ sudo make install #These files are put in /usr/local/bin now. 2.Copy some files important # cp ...日历
最新微语
- 有的时候,会站在分叉路口,不知道向左还是右
2023-12-26 15:34
- 繁花乱开,鸟雀逐风。心自宁静,纷扰不闻。
2023-03-14 09:56
- 对于不可控的事,我们保持乐观,对于可控的事情,我们保持谨慎。
2023-02-09 11:03
- 小时候,
暑假意味着无忧无虑地玩很长一段时间,
节假意味着好吃好喝还有很多长期不见的小朋友来玩...
长大后,
这是女儿第一个暑假,
一个半月...
2022-07-11 08:54
- Watching the autumn leaves falling as you grow older together
2018-10-25 09:45
分类
最新评论
- Goonog
i get it now :) - 萧
@Fluzak:The web host... - Fluzak
Nice blog here! Also... - Albertarive
In my opinion you co... - ChesterHep
What does it plan? - ChesterHep
No, opposite. - mojoheadz
Everything is OK!... - Josephmaigh
I just want to say t... - ChesterHep
What good topic - AnthonyBub
Certainly, never it ...