现象:
今发现网站访问数据库变慢,经查是连接数据库耗时比较长。
解决办法:
在mysql的配置文件my.cnf中,在[mysqld]下面加上这个配置就可以了.
附录:[mysqld]部分要加入一个参数skip-name-resolve :主机名不被解析。加入后在授权表的 Host 的列值必须是IP数字或 localhost 。
How MySQL uses DNS
Wh...
                            
                            
                                分类:
数据库   时间:
2014-05-12 15:24:33   
                                阅读次数:
399
                             
                    
                        
                            
                            
                                How Many Sets IITime Limit:2 Seconds Memory 
Limit:65536 KBGiven a setS= {1, 2, ...,n}, numbermandp, your job is to count how 
many setTsatisfies the fo...
                            
                            
                                分类:
其他好文   时间:
2014-05-12 13:05:52   
                                阅读次数:
238
                             
                    
                        
                            
                            
                                题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=2609
How many
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1225    Accepted Submis...
                            
                            
                                分类:
其他好文   时间:
2014-05-12 06:35:21   
                                阅读次数:
322
                             
                    
                        
                            
                            
                                题目链接:11038 - How Many O's?
题意:求[a.b]之间,0出现的次数。
思路:一开始一直往数位DP上去想,结果发现挺复杂的。。
把问题先转化为求0 - num的个数,在用到b的个数减去到a的个数
其实只要利用计数的乘法和加法原理,把数字对应的每一位的分成左右两边,利用乘法原理求总数,在用加法原理把所有的总数加起来就是总情况数。那么讨论一下分成两边的情况。举个例子
比...
                            
                            
                                分类:
其他好文   时间:
2014-05-11 13:16:13   
                                阅读次数:
282
                             
                    
                        
                            
                            
                                iwangzheng.com16:57 [root@a02.cmsapi]$ mysql 
-u-p -h10.103.xx.xxWelcome to the MySQL monitor. Commands end with ; or \g.Your 
MySQL connection id is 57...
                            
                            
                                分类:
数据库   时间:
2014-05-10 20:57:56   
                                阅读次数:
441
                             
                    
                        
                            
                            
                                原文地址:Authentication options|Basic authorizationIf 
you want to use simple binds with user DN and password within a Java component, 
in order to authenti...
                            
                            
                                分类:
其他好文   时间:
2014-05-10 20:27:03   
                                阅读次数:
485
                             
                    
                        
                            
                            
                                DataTable dt_PI = new DataTable(); //克隆表结构 dt_PI = 
ds.Tables[0].Clone(); dt_PI.Columns["FLTF...
                            
                            
                                分类:
Web程序   时间:
2014-05-10 07:57:11   
                                阅读次数:
570
                             
                    
                        
                            
                            
                                Pat1076代码
题目描述:
Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with foll...
                            
                            
                                分类:
其他好文   时间:
2014-05-10 04:50:24   
                                阅读次数:
403
                             
                    
                        
                            
                            
                                ------------------------------------转---------------------------------In 
this tutorial we are going to see how to deploy JAX-WS Web Services on Tomcat...
                            
                            
                                分类:
其他好文   时间:
2014-05-10 03:05:08   
                                阅读次数:
564
                             
                    
                        
                            
                            
                                绿色版本,解压缩D:\Software\mysql-advanced-5.6.18-winx64my-default.ini 
改名my.inimy.ini内容如下# For advice on how to change settings please see# 
http://dev.mysql.c...
                            
                            
                                分类:
数据库   时间:
2014-05-10 02:30:15   
                                阅读次数:
495