最近在Linux服务器上安装MySql5后,本地使用客户端连MySql速度超慢,本地程序连接也超慢。解决方法:在配置文件my.cnf的[mysqld]下加入skip-name-resolve。原因是默认安装的MySql开启了DNS的反向解析。如果禁用的话就不能在MySQL的授权表中使用主机名了而只能...
分类:
数据库 时间:
2015-07-01 13:42:07
阅读次数:
135
Take Advantage of Code Analysis ToolsSarah Mount
THE VALUE OF TESTING is something that is drummed into software devel- opers from the early stages of their programming journey. In recent years, the r...
分类:
其他好文 时间:
2015-07-01 10:00:07
阅读次数:
86
Course Schedule IIThere are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites, for example to take course ...
分类:
其他好文 时间:
2015-07-01 09:58:52
阅读次数:
118
重点知识: 1.LINQ扩展方法中延迟(Deferred)执行的有: OrderBy/OrderByDescending Reverse Select SelectMany Skip/SkipWhile Take/TakeWhil...
分类:
编程语言 时间:
2015-06-30 21:38:00
阅读次数:
145
[client]port=3306socket=/tmp/mysql.sock[mysqld]port=3306socket=/tmp/mysql.sockbasedir=/usr/local/mysqldatadir=/data/mysqlpid-file=/data/mysql/mysql.piduser=mysqlbind-address=0.0.0.0server-id=1#表示是本机的序号为1,一般来讲就是master的意思skip-name-resolve#禁..
分类:
数据库 时间:
2015-06-29 18:01:23
阅读次数:
233
Linq的排序一般是这样写的:query.OrderBy(x => x.Tel).Skip(0).Take(10);实际使用中排序字段可能是通过字符类型的参数来设置的,于是想这样实现:query.OrderBy(x=>x.GetType().GetField("Tel")).Skip(0).Take...
分类:
编程语言 时间:
2015-06-28 21:30:08
阅读次数:
216
limit方法
如果你需要在MongoDB中读取指定数量的数据记录,可以使用MongoDB的Limit方法,limit()方法接受一个数字参数,该参数指定从MongoDB中读取的记录条数。
mongo #进入mongoDB
use NewsDB #选择NewsDB
db.new.find().limit(5) #列出前5条文档
注:如果你们没有指定limit()方法中的参数则显示...
分类:
数据库 时间:
2015-06-27 16:42:19
阅读次数:
139
因在网络部署了MySQL服务器,目前没有负载,本地连接的时候速度也正常,但就是通过网络连接的时候特别慢,最后检查发现原来是DNS解析的问题在MySQL的配置文件/etc/my.cnf中的[mysqld]下加入skip-name-resolve重新启动,测试速度正常。
分类:
数据库 时间:
2015-06-25 21:26:13
阅读次数:
179
https://leetcode.com/problems/course-schedule-ii/There are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisit...
分类:
其他好文 时间:
2015-06-25 15:30:13
阅读次数:
110
https://leetcode.com/problems/course-schedule/There are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites,...
分类:
其他好文 时间:
2015-06-25 15:23:01
阅读次数:
115