ÈçºÎÐÞ¸ÄmysqlÊý¾Ý¿âµÄÁ¬½ÓÊý
а²×°ºóµÄmysqlÊý¾Ý¿â£¬ÆäĬÈϵÄ×î´óÁ¬½ÓÊýΪ100¡£
·½·¨Ò»£º
ÔÚmysql°²×°Â·¾¶Ï£¬ÕÒµ½my.ini»òÕßmy.cnfÎļþ£¬´ò¿ªËüÕÒµ½max_connections,ÉèÖóÉ1000; È»ºóÖØÆômysql·þÎñ¡£
·½·¨¶þ£º
ÔÚmysqlÔËÐл·¾³Ï£¬½øÈëmysqlÃüÁîÏ£º
mysql> set global max_connections=1000;
È»ºó¹Ø±ÕmysqlÖØÆôËü£»
ÔÚ./bin·¾¶Ï£¬Ê¹Óà # ./mysqladmin -uroot -p123456 variables | grep "max_connections"
¿´µ½ | max_connections | 1000 |
˵Ã÷ÐÂÐ޸ĵÄÁ¬½ÓÊýÒѾÉúЧÁË¡£
Ò²¿ÉÒÔÔÚmysqlÔËÐл·¾³Ï£¬Ö´ÐУºmysql> show variables; ²é¿´max_connectionsµÄÖµ¡£
Ò²¿ÉÒÔÔÚmysqlÔËÐл·¾³Ï£¬Ö´ÐУºmysql> show status; ²é¿´µ±Ç°»î¶¯µÄÁ¬½ÓÏß³ÌÖµ£¬¼´ÕÒµ½threads_connectedµÄÖµ¾ÍÊÇÁË¡£
·½·¨Èý£º
±à¼mysqld_safeÎļþ£º # vi /usr/local/mysql/bin/mysqld_safe
ÕÒµ½msyqldÆô¶¯µÄÄÇÁ½ÐУ¬ÔÚºóÃæ¼ÓÉϲÎÊý£º
-O max_connections=1500
È»ºóÖØÐÂÆô¶¯mysql·þÎñ£¬¾ÍOKÁË¡£
Ïà¹ØÎĵµ£º
---------------------------------------------------------------------------
---- ±¾ÎÄΪandkylee¸öÈËÔ´´£¬ÇëÔÚ×ðÖØ×÷ÕßÀͶ¯³É¹ûµÄÇ°ÌáϽøÐÐתÔØ£»
---- תÔØÎñ±Ø×¢Ã÷Ôʼ³ö´¦
:
http://blog.csdn.net/andkylee
--- 2010-05-31 18:46:12
---- ¹Ø¼ü×Ö£º MySQL ·ÖÒ³ limit
----------------------- ......
¹«Ë¾¿ª·¢ÁËÒ»¸öÍøÕ¾£¬¹À¼Æ×î¸ßÔÚÏßÈËÊýÊÇ3 Íò£¬²¢·¢ÈËÊý×î¶à100 ÈË¡£¿ª·¢µÄÍøÕ¾ÊÇ·ñÄÜ·ñ³ÐÊÜÕâ¸öѹÁ¦£¬ÈçºÎÈ·±£ÍøÕ¾µÄ¸ººÉûÓÐÎÊÌ⣬¾¹ýÑо¿¾ö¶¨ÈçÏ£º
£¨1 £©²ÉÓøºÔØƽºâºÍ¼¯Èº¼¼Êõ£¬³õ²½»ú¹¹²ÉÓÃApache Tomcat µÄ»úȺ¼¼Êõ¡£
£¨2 £©²ÉÓÃѹÁ¦²âÊÔ¹¤¾ß£¬²âÊÔѹÁ¦¡£¹¤¾ßÊÇLoadrunner.
Ó²¼þ»·¾³´î½¨£º
ΪÁËÄܹ»½øÐÐѹÁ¦² ......
½ü¶Îʱ¼äͻȻ¶ÔMYSQLÕâ¸ö¿ªÔ´Êý¾ÝÓÐÁËÐËȤ£¬Ö÷ÒªÊÇÆäÊÇ¿ªÔ´Ãâ·Ñ£¬ÏëÏëÒÔºóÎÞÂÛÊǹ«Ë¾×öÏîÄ¿»¹ÊǸöÈË×öЩ¼òµ¥µÄСϵͳ£¬¶¼¿ÉÒÔÑ¡Ôñ£¬ÓÚÊÇ»¨Á˵ãʱ¼äÑо¿ÁËÏ£¬ÏÖÔÚ·ÖÏíÏÂ×Ô¼ºµÄѧϰÐĵ᣽ñÌì¿´ÁËдÆäϵͳµÄ×é³ÉºÍÕûÌå½á¹¹£¬ÏÖÔÚ°ÑÕûÌåµÄ½á¹¹ÓÃVISIO»ÁËÏ£¬È»ºóÖðÒ»½âÊÍ£¬²¢²ûÊöÏÂÎÒµÄÀí½â£¬Ï±ßÊÇMySQLϵͳ½á¹¹Í¼µ ......
Ò»¡¢MySql£¬ÓÃcmdÃüÁîÌáʾÐÐÁ¬½ÓÊý¾Ý¿â£¬·¢ÏÖ²éѯÊý¾Ý¿âÖеÄÖÐÎijöÏÖÂÒÂ룬¶øÊý¾Ý¿âÀïÃæ´æµÄÊÇutf8£¬¶¼ÊÇÕýÈ·µÄ
ÓÚÊÇÉÏÍøËÑË÷һϣ¬
ÕÒµ½Ïà¹ØÉèÖ÷½·¨ÈçÏ¡£
1¡¢MySQLÊÇÓÐһЩ»·¾³±äÁ¿¿ÉÒÔÉèÖã¬
¿ÉÊäÈ룺show variables;¿É²é¿´µ±Ç°µÄ»·¾³±äÁ¿ÉèÖã»
2¡¢ÕâЩ±äÁ¿µ±ÖÐÓÐÒ»²¿·ÖÓë×Ö·ûÏà¹ØµÄÉèÖã¬
¿ÉÊäÈ룺show variabl ......