jsp页面变量的作用域问题

一个jsp页面就是一个java类,它的变量也跟java类一样,有不同的作用域。用下面的实例说明一下。

下面是把“学习日记开源项目”里面的一个名为disall2.jsp的文件在“JAVA学习日记网站”改写的一个片断,我的目的是在一个循环语句的第一个循环中显示广告,后面的循环不显示。用彩色部分的变量来控制。下面是正确的使用方法。




  <% int count = 0; %>



   <logic:iterate id="aGroupGoals" name="groupGoalsList" type="com.learndiary.website.model.GroupGoalsInfo">

    <c:set var="group" value="${aGroupGoals.group}"/>

    <b><u><c:out value="${group.groupName}"/>(<c:out value="${group.goalsNum}"/>个目标)</u></b>

    <c:set var="goalsList" value="${aGroupGoals.goalsList}"/>

    <br>

  <logic:iterate id="aGoal" name="goalsList" type="com.learndiary.website.model.ArticleInfo">

    <html-el:link action="disGoalContentAction.do?goalID=${aGoal.articleID}&naviStr=${requestScope['naviStr']}" target="_blank" title="查看既定目标:${aGoal.articleName}的具体内容" >

     <c:if test="${aGoal.visibility == 1}">

      <font color="red">[私]</font>

     </c:if>

     <c:if test="${aGoal.joinNum >= 5 && aGoal.joinNum<10}">

      <font size="3">

     </c:if>

     <c:if test="${aGoal.joinNum >= 10}">

      <font size="4">

     </c:if>

     <c:out value="${aGoal.articleName}"/>

    </html-el:link>

    (<c:out value="${aGoal.joinNum}"/>/<html-el:link action="diaryAction.do?goalID=${aGoal.articleID}&naviStr=${requestScope['naviStr']}" target="_blank" title="查看实现目标:${aGoal.articleName}下的所有${aGoal.diarySize}篇日记" >

     <b><u> <c:out value="${aGoal.diarySize}"/> </u></b>

     </html-el:link>)

     </font>

      

   </logic:iterate>

   <p align=center>



   <% if (++count == 1) { %>

   <%@ include file="/common/google_intro_4.jsp" %>

   <% }

    %> 



   <hr size="1" noshade="noshade">

    <p>

  </logic:iterate>

但是,如果把蓝色的部分改动一点,只要你第二次刷新页面的时候,广告就消失了。如下:




  <%! int count = 0; %>


原因是:前者是类方法中的局部变量,作用域局限于java类中的一个方法中,即点击一次页面就重新调用类中的方法,于是,它的记数器总能正确的清零;而后者是类成员变量,作用域为类,在类的当前实例(你访问jsp页面时,这个类在服务器端机器的内存中为你一个人创建的一个对象实例)没有销毁之前,它里面的变量始终是一个,当你刷新页面时,记数器就递增了,不能正确的清零。

我是一个java的业余爱好者,理论基础不行。上面的说法如果不当,还希望见者提示一下。谢谢。

Redhat linux9.0下的宋体比windows下的宋体显示小字体效果好

在网页中我使用了<font size="-2">的字体(及<font size="1">),在Redhat linux9.0下的用中意宋体在firefox下浏览效果还可以,但是同样用firefox在windows XP中浏览页面就惨不忍睹了,用IE也一样。为了照顾大多数windows用户,看来,只有不用这种小字体了。下面是首页在windows下用firefox和在linux下的显示截屏。

1、windows xp下用Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7,宋体字:

2、Redhat linux9.0下的用Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4,中意宋体字:

大家一直都说linux下的中文字体不如windows下的,可我在redhat linux9.0下的使用结果得出的结论却是相反的。但是redhat linux9.0下的字体相对windows也有一点小问题,字体的稍稍有点发虚,不如windows下的清晰。但总体感觉还是比windows下的字体看起来舒服。

一封来自Gentleware的CEO的信

Gentleware的Poseidon for UML建模工具起源于开源UML建模工具:ArgoUML0.9。现在的Gentleware公司的CEO就是ArgoUML的项目拥有者之一:Marko Boger。你可以在ArgoUML的主页上看到。

从下面这封信中,我感到了起源于开源软件的商业软件的强大活力(他也提供共享版本,不过功能很受限,可以作为学习之用);反之,看他的开源前辈ArgoUML,可以说是鲜有使用者,也许在我不了解其中具体情况下下一个不成熟的结论:半死不活。

这是为什么?难道ArgoUML终究不能成为一个像其他开源工具如:ant、eclispe、Tomcat、Linux等一样的流行工具?难道说ArgoUML的存在就是因为有了它的商业分支版本"Poseidon for UML"? 难道ArgoUML就是”认知建模“的一个试验品(它的认知建模好像是可以智能的分析模型的合理程度,还可以根据知识库纠正一些问题或提出建议)?在我用来,它的认知建模好像没有多大用处(起源于它的Poseidon for UML就去掉了这个特性)。搞不懂,不过对我这个UML的学习者来说,用ArgoUML来画画图,理理思路还是够用了。

从下面这封订阅来自Poseidon for UML的信中可以大概知道:

1、它要发集成在eclipse中的Apollo for Eclipse建模插件了;

2、对于发行采用基于Web Service模型的新许可形式了,购买、延续、改变许可将更加自动化;

3、Apollo for Eclipse和 Poseidon for UML同时存在,定位不同,且都有供学习用的共享版本。

下面是这封电子邮件的原文,可以以此来看软件业的趋势、开源软件的命运和运作,以及这些给普通软件用户带来的影响。

××××××××××××××××××××××××××××××××××××××××××××××××××

A Letter to You: From Gentleware's CEO

Dear Loyal Poseidon User,

With this letter, I'd like to inform you about a series of major events and changes that will be occurring in the next few months. Please bear with me; I am certain that you will find this message to be worthwhile reading. You are part of the cherished user base that Gentleware has built up over the past 6 years. As such, you are one of the first to be informed.

We are proud and honored to have such a large and loyal audience, and we have been working extremely hard to fulfill your expectations. Our user community has grown so much that the range of users now extends beyond the scope of our previous tool lineup, and the range of expectations has correspondingly grown. Many users, especially those working in the later development phases who want to review and modify models and code simultaneously, expressed the need for a tight integration into Eclipse. Poseidon for UML is built on Swing while Eclipse is built in SWT, so an integration can only go so far. For a clean integration we had to start from scratch. And so we did.

   

   

Apollo for Eclipse

We are pleased to present our newest tool, Apollo for Eclipse, which will be released in the coming weeks.

Built from the ground up as an extension to Eclipse, Apollo for Eclipse makes use of all of the relevant modules from the Eclipse Modeling Project. Most notably, it uses EMF (Eclipse Modeling Framework) and its instantiation for UML, the UML2 project, as a repository. This provides a standard API and saving format and makes it easy to connect other tools like generators or transformation engines to it.

It is our understanding that this is the first professional modeling tool built using GMF. GMF is a framework to create graphical editors in Eclipse and was released just this summer. We regard it as the best technology available to build modeling tools. It provides a standardized yet adaptable user interface that is well adapted to Eclipse, and it provides us with great flexibility to quickly create editors for standard or domain specific notations.

With the initial release of Apollo for Eclipse, we have focused specifically on the class diagram and a clean, robust, and scalable roundtrip mechanism for Java 5 and UML 2.1. More details will be forthcoming in the next newsletter.

   

   

Poseidon for UML

This isn't to say that Poseidon for UML is going away. Poseidon for UML continues to be the best option on the market for analysts and designers who don't work as extensively with Eclipse. In just a short while, we will be bringing out version 5.0 of Poseidon for UML. As with every release, it has a number of important and interesting updates. But I have to say that this release is really special to me. I feel that after 6 years of development we have now reached what we initially started our quest for: namely, to provide the most usable UML modeling tool available. We will provide you with the specific details of the release in a separate newsletter.

   

   

New Licensing Based on the Web Service Model

The software industry is fast paced and changes quickly. With the ubiquity of the internet and with flexible download and update mechanisms provided by the Eclipse platform, software products today have much of the character of a web service. In response, we have adapted our pricing model to reflect this. We have worked hard to find a model that suits the wide variety of our users, from students with minimal budgets, to occasional users with high demands, and on to large corporations with long-term usage scenarios.

We are introducing a rental and subscription model for our new product, which may be familiar to you from other Internet services. Base functionality of the tool is available for free; extended functionality including all exporting capabilities requires a license.

This rental and subscription license model will apply to the Apollo for Eclipse product. Likewise, we will implement it for the Poseidon for UML Community Edition starting with the release of version 5.0. This solution eliminates the conflicts many users have had with our current license terms, which restricts how the Community Edition may be used through the stated condition, "free for non-commercial use".

The Community Edition was originally intended to be a learning tool for those just starting out in UML. It has become an important tool for analysts and designers who depend on Poseidon for UML to communicate with various stakeholders throughout the development lifecycle. The new licensing agreement now allows these users to take advantage of the many powerful features of Poseidon for UML for the nominal charge of only 5 Euros per month.

The unregistered version of the Poseidon for UML Community Edition can still be used for learning UML; all of the features needed to work alongside a textbook or tutorial remain available. Users can open and edit models to explore code and diagrams, but all export features such as saving, copying to the Windows clipboard, and printing are only available in the registered version.

   

   

Options

The first option is to rent a license for a fixed period of time; specifically, for a month, a quarter, or a year. The fee for one month is 5 EUR or 6 USD, longer periods are further discounted. You always maintain the option, but are not obligated, to renew the license after it expires.

The alternative option is to subscribe to the service and thus be assured of continuous access to the most current version. Updates and registration are automatically conducted as soon as you are online. You can decide on the automatically-renewing payment periods that best suit your needs, again with the choices of a month, a quarter, or a year. You can cancel the subscription easily and transparently at any time.

Students in accredited programs have the additional option to purchase the full Professional Edition at a deep discount, and site licensing for universities remains as an economical alternative. Current Community Edition users will be able to continue to operate under the old license agreement until the beginning of 2007.

   

   

Your Opportunity to Try Apollo for Eclipse

Poseidon for UML and Apollo for Eclipse address two very different types of usages. Whereas Poseidon for UML provides the full power of UML 2 during analysis and design phase, Apollo for Eclipse addresses the needs of developers and programmers. We realise that many of you indeed have both use cases, but at different times. To accomodate our users, soon we will be sending out keys for Apollo for Eclipse to premium edition Poseidon for UML customers for a limited introductory period, so that you can have full access and can immediately evaluate our new offering.

So stay tuned, there are a lot of compelling developments coming in the next few weeks. We hope that you are as excited as we are.

Best regards,

your Marko Boger

CEO, Gentleware AG

   

   

contact      impressum      privacy policy      sitemap      print version

© 2000 - 2006 Gentleware AG

If you no longer wish to receive these emails, please reply to this message with "Unsubscribe" in the subject line or simply click on the following link: Unsubscribe

Gentleware AG

Ludwigstrasse 12

20357 Hamburg

Germany

Read the VerticalResponse marketing policy.

Windows和Linux系统下面MySQL的大小写敏感性不同(含转帖)

同样的建表脚本,在windows下所有的表名都成了小写的了,在建表脚本中,本来"goalsgroup"是"goalsGroup",可是用脚本建表后就全成了小写了;在linux下用这个脚本建表则保持了表名的大小写状态。另外,列名在windows下和linux都能够区分大小写。

我的建表脚本如下:


use learndiarydb;

                                                                               

DROP TABLE IF EXISTS `goalsGroup`;

CREATE TABLE `goalsGroup` (

  `groupID` tinyint(2) unsigned NOT NULL auto_increment,

  `groupName` varchar(60) NOT NULL,

  `writeDate` datetime default NULL,

  `lastUpdate` datetime default NULL,

  `goalsNum` tinyint(2) unsigned NOT NULL default '0',

  `groupPriority` tinyint(1) unsigned NOT NULL default '0',

  PRIMARY KEY  (`groupID`)

) TYPE=InnoDB;

在windows下的表名和列名:

mysql> show tables;

+------------------------+

| Tables_in_learndiarydb |

+------------------------+

| article                |

| emailresetpsd          |

| forbid                 |

| goalsgroup             |

| user                   |

| usergoal               |

| usermailgoal           |

+------------------------+

7 rows in set (0.09 sec)

 

mysql>

mysql> describe goalsgroup;

+---------------+---------------------+------+-----+---------+----------------+

| Field         | Type                | Null | Key | Default | Extra          |

+---------------+---------------------+------+-----+---------+----------------+

| groupID       | tinyint(2) unsigned |      | PRI | NULL    | auto_increment |

| groupName     | varchar(60)         |      |     |         |                |

| writeDate     | datetime            | YES  |     | NULL    |                |

| lastUpdate    | datetime            | YES  |     | NULL    |                |

| goalsNum      | tinyint(2) unsigned |      |     | 0       |                |

| groupPriority | tinyint(1) unsigned |      |     | 0       |                |

+---------------+---------------------+------+-----+---------+----------------+

6 rows in set (0.09 sec)

 

mysql>

********************************************************************

在linux下的表名和列名:

mysql> show tables;

+------------------------+

| Tables_in_learndiarydb |

+------------------------+

| article                |

| emailresetpsd          |

| forbid                 |

| goalsGroup             |

| user                   |

| usergoal               |

| usermailgoal           |

+------------------------+

7 rows in set (0.01 sec)

 

mysql>

mysql> describe goalsGroup;

+---------------+---------------------+------+-----+---------+----------------+

| Field         | Type                | Null | Key | Default | Extra          |

+---------------+---------------------+------+-----+---------+----------------+

| groupID       | tinyint(2) unsigned |      | PRI | NULL    | auto_increment |

| groupName     | varchar(60)         |      |     |         |                |

| writeDate     | datetime            | YES  |     | NULL    |                |

| lastUpdate    | datetime            | YES  |     | NULL    |                |

| goalsNum      | tinyint(2) unsigned |      |     | 0       |                |

| groupPriority | tinyint(1) unsigned |      |     | 0       |                |

+---------------+---------------------+------+-----+---------+----------------+

6 rows in set (0.00 sec)

 

mysql>

******************************************************************

下面是网上一篇相同问题的blog,转自:http://www.zeali.net/entry/364

MySQL的大小写敏感性

zeal 2006-04-27 17:43 于 开发/理论 , 679 字 |  + 0 - 1   English

Made In Zeal 转载请保留原始链接:http://www.zeali.net/entry/364

关键字: mysql,lower_case_table_name,大小写

在 MySQL 中,数据库和表对就于那些目录下的目录和文件。因而,操作系统的敏感性决定数据库和表命名的大小写敏感。这就意味着数据库和表名在 Windows 中是大小写不敏感的,而在大多数类型的 Unix 系统中是大小写敏感的。

奇怪的是列名与列的别名在所有的情况下均是忽略大小写的,而表的别名又是区分大小写的。

要避免这个问题,你最好在定义数据库命名规则的时候就全部采用小写字母加下划线的组合,而不使用任何的大写字母。

或者也可以强制以 -O lower_case_table_names=1 参数启动 mysqld(如果使用 --defaults-file=...\my.cnf 参数来读取指定的配置文件启动 mysqld 的话,你需要在配置文件的 [mysqld] 区段下增加一行 lower_case_table_names=1)。这样MySQL 将在创建与查找时将所有的表名自动转换为小写字符(这个选项缺省地在 Windows 中为 1 ,在 Unix 中为 0。从 MySQL 4.0.2 开始,这个选项同样适用于数据库名)。

当你更改这个选项时,你必须在启动 mysqld 前首先将老的表名转换为小写字母。

换句话说,如果你希望在数据库里面创建表的时候保留大小写字符状态,则应该把这个参数置0: lower_case_table_names=1 。否则的话你会发现同样的sqldump脚本在不同的操作系统下最终导入的结果不一样(在Windows下所有的大写字符都变成小写了)。

I found a way for promoting LearnDiary and learning english

Two years past, I suddenly found may be the key of LearnDiary's lacking hot.

The key is no a specialized location for website, so no the specialized friends participate this website.

So, I am doing some changes these days, I think the work I have finished the most part.

Another found for learning english, I found a method of learning english at website: http://seawan.nyist.net/kle/index.php, it is saying, he, you can learning english well by see film. I will try it, is it a real way for me to learn english? Only the time can answer.

Happy these days!

mysql中的max_connections和max_user_connections

max_connections是指整个mysql服务器的最大连接数;

max_user_connections是指每个数据库用户的最大连接数,比如:虚拟主机可以用这个参数控制每个虚拟主机用户的数据库最大连接数;

****************************************************************************

设置最大连接数的方法:

转自:fanqiang.chinaunix.net/a2/b1/20010705/140800801.html

加大mysql的最大连接数

本文出自: 作者: (2001-07-05 14:08:00)

mysql的最大连接数默认是100, 这个数值对于并发连接很多的数据库应用是远远不够

的,可以把它适当调大,

whereis safe_mysqld

找到safe_mysqld的位置,然后编辑它,找到mysqld启动的那两行,在后面加上参数

-O max_connections=1000

例如

--- safe_mysqld.orig Mon Sep 25 09:34:01 2000

+++ safe_mysqld Sun Sep 24 16:56:46 2000

@@ -109,10 +109,10 @@

if test "$#" -eq 0

then

nohup $ledir/mysqld --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR \

- --skip-locking >> $err_log 2>&1

+ --skip-locking -O max_connections=1000 >> $err_log 2>&1

else

nohup $ledir/mysqld --basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR \

- --skip-locking "$@" >> $err_log 2>&1

+ --skip-locking "$@" -O max_connections=1000 >> $err_log 2>&1

fi

if test ! -f $pid_file # This is removed if normal shutdown

then

然后关闭mysql重启它,用

/mysqladmin所在路径/mysqladmin -uroot -p variables

输入root数据库账号的密码后可看到

| max_connections | 1000 |

即新改动已经生效。

*************************************************************************

另,从网上查到一篇介绍mysql参数说明的帖子很好,转帖在此:

转自:http://kb.discuz.net/index.php?title=MySQL%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E

MySQL参数说明

Wikipedia,自由的百科全书

原文地址:http://sunsite.mff.cuni.cz/MIRRORS/ftp.mysql.com/doc/en/SHOW_VARIABLES.html

1. back_log

指定MySQL可能的连接数量。当MySQL主线程在很短的时间内得到非常多的连接请求,该参数就起作用,之后主线程花些时间(尽管很短)检查连接并且启动一个新线程。

back_log参数的值指出在MySQL暂时停止响应新请求之前的短时间内多少个请求可以被存在堆栈中。如果系统在一个短时间内有很多连接,则需要增大该参数的值,该参数值指定到来的TCP/IP连接的侦听队列的大小。不同的操作系统在这个队列大小上有它自己的限制。试图设定back_log高于你的操作系统的限制将是无效的。

当观察MySQL进程列表,发现大量 264084 | unauthenticated user | xxx.xxx.xxx.xxx | NULL | Connect | NULL | login | NULL 的待连接进程时,就要加大 back_log 的值。back_log默认值为50。

2. basedir

MySQL主程序所在路径,即:--basedir参数的值。

3. bdb_cache_size

分配给BDB类型数据表的缓存索引和行排列的缓冲区大小,如果不使用DBD类型数据表,则应该在启动MySQL时加载 --skip-bdb 参数以避免内存浪费。

4.bdb_log_buffer_size

分配给BDB类型数据表的缓存索引和行排列的缓冲区大小,如果不使用DBD类型数据表,则应该将该参数值设置为0,或者在启动MySQL时加载 --skip-bdb 参数以避免内存浪费。

5.bdb_home

参见 --bdb-home 选项。

6. bdb_max_lock

指定最大的锁表进程数量(默认为10000),如果使用BDB类型数据表,则可以使用该参数。如果在执行大型事物处理或者查询时发现 bdb: Lock table is out of available locks or Got error 12 from ... 错误,则应该加大该参数值。

7. bdb_logdir

指定使用BDB类型数据表提供服务时的日志存放位置。即为 --bdb-logdir 的值。

8. bdb_shared_data

如果使用 --bdb-shared-data 选项则该参数值为On。

9. bdb_tmpdir

BDB类型数据表的临时文件目录。即为 --bdb-tmpdir 的值。

10. binlog_cache_size

为binary log指定在查询请求处理过程中SQL 查询语句使用的缓存大小。如果频繁应用于大量、复杂的SQL表达式处理,则应该加大该参数值以获得性能提升。

11. bulk_insert_buffer_size

指定 MyISAM 类型数据表表使用特殊的树形结构的缓存。使用整块方式(bulk)能够加快插入操作( INSERT ... SELECT, INSERT ... VALUES (...), (...), ..., 和 LOAD DATA INFILE) 的速度和效率。该参数限制每个线程使用的树形结构缓存大小,如果设置为0则禁用该加速缓存功能。注意:该参数对应的缓存操作只能用户向非空数据表中执行插入操作!默认值为 8MB。

12. character_set

MySQL的默认字符集。

13. character_sets

MySQL所能提供支持的字符集。

14. concurrent_inserts

如果开启该参数,MySQL则允许在执行 SELECT 操作的同时进行 INSERT 操作。如果要关闭该参数,可以在启动 mysqld 时加载 --safe 选项,或者使用 --skip-new 选项。默认为On。

15. connect_timeout

指定MySQL服务等待应答一个连接报文的最大秒数,超出该时间,MySQL向客户端返回 bad handshake。

16. datadir

指定数据库路径。即为 --datadir 选项的值。

17. delay_key_write

该参数只对 MyISAM 类型数据表有效。有如下的取值种类:

off: 如果在建表语句中使用 CREATE TABLE ... DELAYED_KEY_WRITES,则全部忽略

DELAYED_KEY_WRITES;

on: 如果在建表语句中使用 CREATE TABLE ... DELAYED_KEY_WRITES,则使用该选项(默认);

all: 所有打开的数据表都将按照 DELAYED_KEY_WRITES 处理。

如果 DELAYED_KEY_WRITES 开启,对于已经打开的数据表而言,在每次索引更新时都不刷新带有

DELAYED_KEY_WRITES 选项的数据表的key buffer,除非该数据表关闭。该参数会大幅提升写入键值的速

度。如果使用该参数,则应该检查所有数据表:myisamchk --fast --force。

18.delayed_insert_limit

在插入delayed_insert_limit行后,INSERT DELAYED处理模块将检查是否有未执行的SELECT语句。如果有,在继续处理前执行允许这些语句。

19. delayed_insert_timeout

一个INSERT DELAYED线程应该在终止之前等待INSERT语句的时间。

20. delayed_queue_size

为处理INSERT DELAYED分配的队列大小(以行为单位)。如果排队满了,任何进行INSERT DELAYED的客户必须等待队列空间释放后才能继续。

21. flush

在启动MySQL时加载 --flush 参数打开该功能。

22. flush_time

如果该设置为非0值,那么每flush_time秒,所有打开的表将被关,以释放资源和sync到磁盘。注意:只建议在使用 Windows9x/Me 或者当前操作系统资源严重不足时才使用该参数!

23. ft_boolean_syntax

搜索引擎维护员希望更改允许用于逻辑全文搜索的操作符。这些则由变量 ft_boolean_syntax 控制。

24. ft_min_word_len

指定被索引的关键词的最小长度。注意:在更改该参数值后,索引必须重建!

25. ft_max_word_len

指定被索引的关键词的最大长度。注意:在更改该参数值后,索引必须重建!

26. ft_max_word_len_for_sort

指定在使用REPAIR, CREATE INDEX, or ALTER TABLE等方法进行快速全文索引重建过程中所能使用的关键词的最大长度。超出该长度限制的关键词将使用低速方式进行插入。加大该参数的值,MySQL将会建立更大的临时文件(这会减轻CPU负载,但效率将取决于磁盘I/O效率),并且在一个排序取内存放更少的键值。

27. ft_stopword_file

从 ft_stopword_file 变量指定的文件中读取列表。在修改了 stopword 列表后,必须重建 FULLTEXT 索引。

28. have_innodb

YES: MySQL支持InnoDB类型数据表; DISABLE: 使用 --skip-innodb 关闭对InnoDB类型数据表的支持。

29. have_bdb

YES: MySQL支持伯克利类型数据表; DISABLE: 使用 --skip-bdb 关闭对伯克利类型数据表的支持。

30. have_raid

YES: 使MySQL支持RAID功能。

31. have_openssl

YES: 使MySQL支持SSL加密协议。

32. init_file

指定一个包含SQL查询语句的文件,该文件在MySQL启动时将被加载,文件中的SQL语句也会被执行。

33. interactive_timeout

服务器在关上它前在一个交互连接上等待行动的秒数。一个交互的客户被定义为对mysql_real_connect()使用CLIENT_INTERACTIVE选项的客户。也可见wait_timeout。

34. join_buffer_size

用于全部联合(join)的缓冲区大小(不是用索引的联结)。缓冲区对2个表间的每个全部联结分配一次缓冲区,当增加索引不可能时,增加该值可得到一个更快的全部联结。(通常得到快速联结的最佳方法是增加索引。)

35. key_buffer_size

用于索引块的缓冲区大小,增加它可得到更好处理的索引(对所有读和多重写),到你能负担得起那样多。如果你使它太大,系统将开始变慢慢。必须为OS文件系统缓存留下一些空间。为了在写入多个行时得到更多的速度。

36. language

用户输出报错信息的语言。

37. large_file_support

开启大文件支持。

38. locked_in_memory

使用 --memlock 将mysqld锁定在内存中。

39. log

记录所有查询操作。

40. log_update

开启update log。

41. log_bin

开启 binary log。

42. log_slave_updates

如果使用链状同步或者多台Slave之间进行同步则需要开启此参数。

43. long_query_time

如果一个查询所用时间超过该参数值,则该查询操作将被记录在Slow_queries中。

44. lower_case_table_names

1: MySQL总使用小写字母进行SQL操作;

0: 关闭该功能。

注意:如果使用该参数,则应该在启用前将所有数据表转换为小写字母。

45. max_allowed_packet

一个查询语句包的最大尺寸。消息缓冲区被初始化为net_buffer_length字节,但是可在需要时增加到max_allowed_packet个字节。该值太小则会在处理大包时产生错误。如果使用大的BLOB列,必须增加该值。

46. net_buffer_length

通信缓冲区在查询期间被重置到该大小。通常不要改变该参数值,但是如果内存不足,可以将它设置为查询期望的大小。(即,客户发出的SQL语句期望的长度。如果语句超过这个长度,缓冲区自动地被扩大,直到max_allowed_packet个字节。)

47. max_binlog_cache_size

指定binary log缓存的最大容量,如果设置的过小,则在执行复杂查询语句时MySQL会出错。

48. max_binlog_size

指定binary log文件的最大容量,默认为1GB。

49. max_connections

允许同时连接MySQL服务器的客户数量。如果超出该值,MySQL会返回Too many connections错误,但通常情况下,MySQL能够自行解决。

50. max_connect_errors

对于同一主机,如果有超出该参数值个数的中断错误连接,则该主机将被禁止连接。如需对该主机进行解禁,执行:FLUSH HOST;。

51. max_delayed_threads

不要启动多于的这个数字的线程来处理INSERT DELAYED语句。如果你试图在所有INSERT DELAYED线程在用后向一张新表插入数据,行将被插入,就像DELAYED属性没被指定那样。

52. max_heap_table_size

内存表所能使用的最大容量。

53. max_join_size

如果要查询多于max_join_size个记录的联合将返回一个错误。如果要执行没有一个WHERE的语句并且耗费大量时间,且返回上百万行的联结,则需要加大该参数值。

54. max_sort_length

在排序BLOB或TEXT值时使用的字节数(每个值仅头max_sort_length个字节被使用;其余的被忽略)。

55. max_user_connections

指定来自同一用户的最多连接数。设置为0则代表不限制。

56. max_tmp_tables

(该参数目前还没有作用)。一个客户能同时保持打开的临时表的最大数量。

57. max_write_lock_count

当出现max_write_lock_count个写入锁定数量后,开始允许一些被锁定的读操作开始执行。避免写入锁定过多,读取操作处于长时间等待状态。

58. myisam_recover_options

即为 --myisam-recover 选项的值。

(未完成,不断增加中……)