mysqlÅäÖÃÎļþ£¨my.cnf)
ÏÖÓеķþÎñÆ÷ÊÇ4ºË£¬ÄÚ´æÎª4G£¬Êý¾Ý¿âֻʹÓÃinnodbÊý¾ÝÒýÇæ¡£Á´½ÓÊý¿ÉÄܱȽϸߣ¬ÏÈÉèÖÃΪ500°É£¬¶øÇÒÊý¾Ý¿âÖеÄÊý¾Ý²åÈë¡¢¸üкÍɾ³ý²Ù×÷»á·Ç³£µÄƵ·±¡£
ÓÐûÓиßÈ˰ïæÅäÖÃÒ»ÏÂmy.cnf
Õâ¸öûÓж¨Â۵쬾ßÌåÎÊÌâ¾ßÌå·ÖÎö£¬¶øÇÒͬһӦÓò»Í¬ÔËÐн׶ÎÒ²¿ÉÄÜ´ó²»Ò»ÑùµÄ
¸ø¸öµØÖ·Äã²Î¿¼Ï°ɣº
http://thomaslee007.javaeye.com/blog/234244
¿´°ïÖúÊÖ²á°É¡£ buffer_size´óЩ£¬log²»ÓõĹصô£¬logÎļþÉèÖôóµã¡£ÆäËû²ÎÊý¿´ÄãÓ¦ÓÃÇé¿ö¶Ô±È×ÅÊֲῴןİɣ¬ÎÒÒ»°ãÐÞ¸ÃΪĬÈÏÖµµÄ2±¶»ò1/3
Á¬½ÓÊýͦ´ó°¡¡£¡£
ÏÖÓеķþÎñÆ÷ÊÇ4ºË£¬ÄÚ´æÎª4G£¬Êý¾Ý¿âֻʹÓÃinnodbÊý¾ÝÒýÇæ¡£
Á´½ÓÊý¿ÉÄܱȽϸߣ¬ÏÈÉèÖÃΪ500°É£¬¶øÇÒÊý¾Ý¿âÖеÄÊý¾Ý²åÈë¡¢¸üкÍɾ³ý²Ù×÷»á·Ç³£µÄƵ·±¡£
-----------------------------
¿É¼ûÄãʹÓÃINNODBÊÇÕýÈ·µÄ
×îºÃ²»Ê¹ÓÃÊÂÎï
Ïà¹ØÎÊ´ð£º
ÊÇÒ»Ìõ¸üвÙ×÷£º
Java code:
¡¡
private Integer bonus = 0;
public Integer getBonus() {
return bonus;
}
public void setBonus(Integer bonus) {
this.bonus = bonus;
}
String SQL = ......
jspÌá½»Ò³±àÂëÊÇUTF-8£¬MYSQL¿âÒ²ÊÇUTF-8,ΪʲôÌá½»ÁËÖÐÎÄ×Ö·ûÔÚÊý¾Ý¿âÀï±ä³ÉÂÒÂëÁËÄØ£¿
ÕâÖÖÎÊÌâÔõô½â¾ö£¿Ð»Ð»
ÁíÍ⣬JSPµ¯³ö¶Ô»°¿ò£¨±ÈÈ絯³ö¡°XXXÉóºËͨ¹ý¡±ÏÂÃæ¸úÈ·¶¨°´Å¥£©ºÍ·µ»ØÉÏÒ»Ò³ÒÔ¼°×ªµ ......
ÔÚphpÖÐÓÃÕâ¾ä¾Í¿ÉʵÏÖ¶Ô¿Í»§¶Ë×Ö·û¼¯µÄÉèÖÃ....
mysql_query("set names gb2312")
ÇëÎÊÔÚjspÖÐÈçºÎʵÏÖÕâ¾ä¹¦ÄÜ£¿£¿£¿
jspÖУº
<%@page language="java" contentType=&q ......
ÇëÎÊһϣ¬mysqlµÄsequenceÊÇ×Ô¶¯µÝÔöµÄ£¬²»ÐèÒª½øÐвÙ×÷¡£
ÄÇÎÒÔÚ²åÈëÒ»ÌõÖ÷¼Ç¼µÄʱºò£¬Í¬Ê±Òª¸øÕâ¸öÖ÷¼üµÄÆäËû±í½øÐвåÈëÊý¾Ý¡£Õâʱºò£¬ÎÒ¸ù±¾È¡²»µ½Õâ¸öµÝÔöµÄsequence°¢¡£¡£
Õâ¸öÎÊÌâÔõô½â¾ö°¢¡£¡£
......
×î½üÔÚÑо¿Êý¾Ý¿âµÄ°²È«ÎÊÌ⣬·¢ÏÖMYSQLÓкܶలȫ©¶´£¬ÏëÇë½Ì´ó¼Ò£¬ÔÚ¹ÜÀí·½ÃæÈçºÎÀ´·ÀÖ¹°²È«Òþ»¼¡£
ÎÒÁ˽⵽ÓÐ×¢Èë¹¥»÷£¬¸ÃÈçºÎ·ÀÖ¹£¿
»¹ÓйØÓÚÕ˺š¢ÃÜÂëµÄ¹ÜÀí¡¢ÎļþÊôÐÔµÈ
1. ²Ù×÷ϵͳµÄ°²È«£¬ ......