mysqlÐÔÄÜÓÅ»¯µÄ²ÎÊý¼ò½é
1)¡¢back_log£º
ÒªÇó MySQL ÄÜÓеÄÁ¬½ÓÊýÁ¿¡£µ±Ö÷ÒªMySQLÏß³ÌÔÚÒ»¸öºÜ¶Ìʱ¼äÄڵõ½·Ç³£¶àµÄÁ¬½ÓÇëÇó£¬Õâ¾ÍÆð×÷Óã¬È»ºóÖ÷Ï̻߳¨Ð©Ê±¼ä(¾¡¹ÜºÜ¶Ì)¼ì²éÁ¬½Ó²¢ÇÒÆô¶¯Ò»¸öÐÂÏ̡߳£
back_logÖµÖ¸³öÔÚMySQLÔÝʱֹͣ»Ø´ðÐÂÇëÇó֮ǰµÄ¶Ìʱ¼äÄÚ¶àÉÙ¸öÇëÇó¿ÉÒÔ±»´æÔÚ¶ÑÕ»ÖС£Ö»ÓÐÈç¹ûÆÚÍûÔÚÒ»¸ö¶Ìʱ¼äÄÚÓкܶàÁ¬½Ó£¬ÄãÐèÒªÔö¼ÓËü£¬»»¾ä»°Ëµ£¬ÕâÖµ¶Ôµ½À´µÄTCP/IPÁ¬½ÓµÄÕìÌý¶ÓÁеĴóС¡£ÄãµÄ²Ù×÷ϵͳÔÚÕâ¸ö¶ÓÁдóСÉÏÓÐËü×Ô¼ºµÄÏÞÖÆ¡£ÊÔͼÉ趨back_log¸ßÓÚÄãµÄ²Ù×÷ϵͳµÄÏÞÖƽ«ÊÇÎÞЧµÄ¡£
µ±Äã¹Û²ìÄãµÄÖ÷»ú½ø³ÌÁÐ±í£¬·¢ÏÖ´óÁ¿ 264084 | unauthenticated user | xxx.xxx.xxx.xxx | NULL | Connect | NULL | login | NULL µÄ´ýÁ¬½Ó½ø³Ìʱ£¬¾ÍÒª¼Ó´ó back_log µÄÖµÁË¡£Ä¬ÈÏÊýÖµÊÇ50£¬ÎÒ°ÑËü¸ÄΪ500¡£
(2)¡¢interactive_timeout£º
·þÎñÆ÷ÔڹرÕËüÇ°ÔÚÒ»¸ö½»»¥Á¬½ÓÉϵȴýÐж¯µÄÃëÊý¡£Ò»¸ö½»»¥µÄ¿Í»§±»¶¨ÒåΪ¶Ô mysql_real_connect()ʹÓà CLIENT_INTERACTIVE Ñ¡ÏîµÄ¿Í»§¡£ ĬÈÏÊýÖµÊÇ28800£¬ÎÒ°ÑËü¸ÄΪ7200¡£
(3)¡¢key_buffer_size£º
Ë÷Òý¿éÊÇ»º³åµÄ²¢ÇÒ±»ËùÓеÄÏ̹߳²Ïí¡£key_buffer_sizeÊÇÓÃÓÚË÷Òý¿éµÄ»º³åÇø´óС£¬Ôö¼ÓËü¿ÉµÃµ½¸üºÃ´¦ÀíµÄË÷Òý(¶ÔËùÓжÁºÍ¶àÖØд)£¬µ½ÄãÄܸºµ£µÃÆðÄÇÑù¶à¡£Èç¹ûÄãʹËüÌ«´ó£¬ÏµÍ³½«¿ªÊ¼»»Ò³²¢ÇÒÕæµÄ±äÂýÁË¡£Ä¬ÈÏÊýÖµÊÇ8388600(8M)£¬ÎÒµÄMySQLÖ÷»úÓÐ2GBÄڴ棬ËùÒÔÎÒ°ÑËü¸ÄΪ402649088(400MB)¡£
(4)¡¢max_connections£º
ÔÊÐíµÄͬʱ¿Í»§µÄÊýÁ¿¡£Ôö¼Ó¸ÃÖµÔö¼Ó mysqld ÒªÇóµÄÎļþÃèÊö·ûµÄÊýÁ¿¡£Õâ¸öÊý×ÖÓ¦¸ÃÔö¼Ó£¬·ñÔò£¬Ä㽫¾³£¿´µ½ Too many connections ´íÎó¡£ Ä¬ÈÏÊýÖµÊÇ100£¬ÎÒ°ÑËü¸ÄΪ1024 ¡£
(5)¡¢record_buffer£º
ÿ¸ö½øÐÐÒ»¸ö˳ÐòɨÃèµÄÏß³ÌΪÆäɨÃèµÄÿÕűí·ÖÅäÕâ¸ö´óСµÄÒ»¸ö»º³åÇø¡£Èç¹ûÄã×öºÜ¶à˳ÐòɨÃ裬Äã¿ÉÄÜÏëÒªÔö¼Ó¸ÃÖµ¡£Ä¬ÈÏÊýÖµÊÇ131072(128K)£¬ÎÒ°ÑËü¸ÄΪ16773120 (16M)
(6)¡¢sort_buffer£º
ÿ¸öÐèÒª½øÐÐÅÅÐòµÄÏ̷߳ÖÅä¸Ã´óСµÄÒ»¸ö»º³åÇø¡£Ôö¼ÓÕâÖµ¼ÓËÙORDER BY»òGROUP BY²Ù×÷¡£Ä¬ÈÏÊýÖµÊÇ2097144(2M)£¬ÎÒ°ÑËü¸ÄΪ 16777208 (16M)¡£
(7)¡¢table_cache£º
ΪËùÓÐÏ̴߳ò¿ª±íµÄÊýÁ¿¡£Ôö¼Ó¸ÃÖµÄÜÔö¼ÓmysqlÒªÇóµÄÎļþÃèÊö·ûµÄÊýÁ¿¡£MySQL¶Ôÿ¸öΨһ´ò¿ªµÄ±íÐèÒª2¸öÎļþÃèÊö·û¡£Ä¬ÈÏÊýÖµÊÇ64£¬ÎÒ°ÑËü¸ÄΪ512¡£
(8)¡¢thread_cache_size£º
¿ÉÒÔ¸´Óõı£´æÔÚÖеÄÏ̵߳ÄÊýÁ¿¡£Èç¹ûÓУ¬ÐµÄÏ̴߳ӻº´æÖÐÈ¡µÃ£¬µ±¶Ï¿ªÁ¬½ÓµÄʱºòÈç¹ûÓпռ䣬¿Í»§µÄÏß
Ïà¹ØÎĵµ£º
tomcat+jdk+mysqlÃâ°²×°µÄÕûºÏÐÎʽ
Ò»£º tomcat+jdk Ãâ°²×°
ºÜ¾ÃÒÔÇ°¾Í¿ªÊ¼Óà tomcat µÄÃâ°²×°°æ(zip ½âѹ°æ)¡£Ö±½ÓÔËÐÐ bin/startup.bat µÄ·½Ê½ÔËÐУ¬ÓÐÒ»¸ö²»ºÃµÄµØ·½¾ÍÊÇ×¢ÏúµÇ¼Óû§³ÌÐò¾ÍÍ˳öÁË¡£±ÈÈç windows 2003 server °æÖÐÔËÐÐ tomcat ÒÔÌṩ¶ÔÍâ·þÎñ£¬ºÜ¿ÉÄܹÜÀíÔ±Æô¶¯ÁË tomcat ºó¾ÍÍ˳ö windows 200 ......
ÔÚ½üÆÚµÄÏîĿά»¤¹¤×÷ÖУ¬Ê±³£³öÏÖÖ÷¼üÖظ´µÄÒì³£¡£¾¹ýһϵÁÐ×ÊÁϵIJéѯ֮ºó£¬·¢ÏÖʱhibernateÓ³ÉäÎļþÅäÖÃÎÊÌâ¡£
mysqlÌṩÖ÷¼ü“×Ô¶¯ÔöÁ¿”µÄÅäÖã¬Ö¸¶¨¸ÃÀàÐ͵ÄÖ÷¼ü£¬mysqlÄܹ»×Ô¶¯¼ÓÒ»¡£
ÔÚhibernateÓ³ÉäÎļþÖУ¬¹ØÓÚÖ÷¼üµÄÅäÖò»ÄÜÊÇ
<generator class="increment"&g ......
À´×Ô: http://www.phpv.net/html/1666.html
#BEGIN CONFIG INFO
#DESCR: 4GB RAM, ֻʹÓÃInnoDB, ACID, ÉÙÁ¿µÄÁ¬½Ó, ¶ÓÁиºÔØ´ó
#TYPE: SYSTEM
#END CONFIG INFO
#
# ´ËmysqlÅäÖÃÎļþÀý×ÓÕë¶Ô4GÄÚ´æ
# Ö÷ҪʹÓÃINNODB
#´¦Àí¸´ÔÓ¶ÓÁв¢ÇÒÁ¬½ÓÊýÁ¿½ÏÉÙµÄmysql·þÎñÆ÷
#
# ½«´ËÎļþ¸´ÖƵ½/etc/my.cnf ×÷Ϊȫ¾ÖÉèÖÃ, ......
mysqladmin extended (¾ø¶ÔÖµ)
ÖصãÈ¥¼àÊÓµÄÖµÓУº
* Slave_running:Èç¹ûϵͳÓÐÒ»¸ö´Ó¸´ÖÆ·þÎñÆ÷£¬Õâ¸öÖµÖ¸Ã÷ÁË´Ó·þÎñÆ÷µÄ½¡¿µ¶È
* Threads_connected:µ±Ç°¿Í»§¶ËÒÑÁ¬½ÓµÄÊýÁ¿¡£Õâ¸öÖµ»áÉÙÓÚÔ¤ÉèµÄÖµ£¬µ«ÄãÒ²ÄܼàÊÓµ½Õâ¸öÖµ½Ï´ó£¬Õâ¿É±£Ö¤¿Í»§¶ËÊÇ´¦ÔÚ»îԾ״̬¡£
* Threads_running:Èç¹ûÊý¾Ý¿â³¬¸ººÉÁË£¬Ä㽫»áµÃµ½Ò»¸ö ......
ÊýÖµÀàÐÍ
¡¡¡¡MySQL
µÄÊýÖµÊý¾ÝÀàÐÍ¿ÉÒÔ´óÖ»®·ÖΪÁ½¸öÀà±ð£¬Ò»¸öÊÇÕûÊý£¬ÁíÒ»¸öÊǸ¡µãÊý»òСÊý¡£Ðí¶à²»Í¬µÄ×ÓÀàÐͶÔÕâЩÀà±ðÖеÄÿһ¸ö¶¼ÊÇ¿ÉÓõģ¬Ã¿¸ö×ÓÀàÐÍÖ§³Ö²»Í¬´óСµÄÊý¾Ý£¬²¢ÇÒ
MySQL ÔÊÐíÎÒÃÇÖ¸¶¨ÊýÖµ×Ö¶ÎÖеÄÖµÊÇ·ñÓÐÕý¸ºÖ®·Ö»òÕßÓÃÁãÌî²¹¡£
¡¡¡¡±íÁгöÁ˸÷ÖÖÊýÖµÀàÐÍÒÔ¼°ËüÃǵÄÔÊÐí·¶Î§ºÍÕ¼ÓõÄÄÚ´æ¿Õ¼ä¡ ......