现象:
今发现网站访问数据库变慢,经查是连接数据库耗时比较长。
解决办法:
在mysql的配置文件my.cnf中,在[mysqld]下面加上这个配置就可以了.
附录:[mysqld]部分要加入一个参数skip-name-resolve :主机名不被解析。加入后在授权表的 Host 的列值必须是IP数字或 localhost 。
How MySQL uses DNS
Wh...
分类:
数据库 时间:
2014-05-12 15:24:33
阅读次数:
399
我×。。。终于好了,大概3 4个小时吧。。。各种毛刺问题。终究还是闯过来了。。。。
ubuntu2@ubuntu:~/Downloads/linux-0.00-050613/linux-0.00$ make
ld -s -x -M head.o -o system > System.map
dd bs=32 if=boot of=Image skip=1
16+0 records i...
分类:
系统相关 时间:
2014-05-10 10:24:29
阅读次数:
474
Redis的client设计如下:
/* With multiplexing we need to take per-clinet state.
* Clients are taken in a liked list. */
typedef struct redisClient {
int fd;
redisDb *db;
int dictid;
sds que...
分类:
其他好文 时间:
2014-05-10 03:44:21
阅读次数:
292
题目描述N integers are arranged on a circle clockwise.
Given two integers M and K. For each position, you should take M continuous
integers on the left an...
分类:
其他好文 时间:
2014-05-09 10:30:49
阅读次数:
350
https://01.org/zh/linux-acpiThe goal of this
project is to enable Linux to take advantage of platforms that support ACPI
(Advanced Configuration & Pow...
分类:
系统相关 时间:
2014-05-09 02:52:28
阅读次数:
623
COLOR 0ACLS@ECHO OffTitle
查询局域网内在线电脑IP:send@ECHO off&setlocal enabledelayedexpansionECHO
正在获取本机的IP地址,请稍等...for /f "tokens=3 skip=2 delims=: " %%i in (...
分类:
其他好文 时间:
2014-05-08 18:06:11
阅读次数:
232
首先,在从库上执行:showslavestatus\G,发现SQL显示:NO,并且报错删除日志子类的。解决方法:才从库上连续执行若干次如下命令即可解决:mysql>slavestop;mysql>SETGLOBALSQL_SLAVE_SKIP_COUNTER=1;#跳过一个事务mysql>slavestart;
分类:
其他好文 时间:
2014-05-07 22:27:15
阅读次数:
390
The Morning Commute
The Chef commutes to work every day using the city's underground metro. The schedule for the trains has recently been changed and he wants to know how long it will take to tra...
分类:
其他好文 时间:
2014-05-07 15:37:11
阅读次数:
406
让我们简单Let’s take a look at three (very basic) ways to get a scoped token from Keystone (theOpenStack Identity
Project). Keep in mind that these are just a few ways you can go about this. Before tryin...
分类:
其他好文 时间:
2014-05-06 19:30:32
阅读次数:
359
#servicemysqlstop#servicemysqlstart--skip-grant-tables//跳过授权表启动MySQL服务程序#mysql-uroot//不需要密码登录mysql>updatemysql.usersetpassword=password(‘123456‘)wherehost="localhost";//通过修改mysql库中user表的相关记录重置密码QueryOK,0rowsaffected(0.38..
分类:
数据库 时间:
2014-05-06 16:52:46
阅读次数:
439