MySQLÁ¬½Óʱ¿ìʱÂýµÄÎÊÌâ½â¾ö
my.iniÀïµÄÄǸötmp_table_sizeµÄÖµ.ÔÀ´tmp_table_size=16M.ÎÒ¸ÄΪ32M
È»ºóÖØÆôMYSQL»¹ÊÇû½â¾öÎÊÌâ.
Ö»ºÃÖØÆô·þÎñÆ÷ÊÔÊÔÁË,½á¹ûÖØÆôºóCPUÕý³£ÁË.²»¹ý»¹ÊÇûÕÒ³öÊÇʲôÔÒòµ¼ÖÂMYSQLÕ¼ÓÃÄÇô¶àCPU×ÊÔ´.
=====================================
ÐÞ¸ÄhostsÎļþ£¬¼ÓÈëÒ»ÐÐ
172.16.59.12 abc
Ð޸ijɹ¦ÒÔºóping abcÓ¦¸ÃÓзµ»Ø
ÒÔºóÖ±½ÓÔÚ³ÌÐòÖÐÓÃabcÁ¬½ÓÊý¾Ý¿â£¬²»ÒªÓÃ172.16.59.12
=====================================
my.cnfÀïÐÞ¸ÄÅäÖ㬽ûÓÃDNS·´Ïò½âÎö£º
[mysqld]
skip-name-resolve
skip-grant-tables
²¹³ä--skip-name-resolveÕâ¸öÑ¡ÏîµÄ×÷Óãº
mysql¿Í»§¶Ëÿ´Î·ÃÎÊdb£¬mysql¾Í»áÊÔͼȥ½âÎöÀ´·ÃÎʵĻúÆ÷µÄhostname£¬²¢»º´æµ½hostname cache£¬Èç¹ûÕâʱ½âÎö²»ÁË£¬µÈÒ»¶Îʱ¼ä»áʧ°Ü£¬Êý¾Ý²ÅÄܱ»È¡¹ýÀ´¡£
ÈôʹÓÖskip-grant-tablesϵͳ½«¶ÔÈκÎÓû§µÄ·ÃÎʲ»×öÈκηÃÎÊ¿ØÖÆ£¬µ«¿ÉÒÔÓà mysqladmin flush-privileges»òmysqladmin reloadÀ´¿ªÆô·ÃÎÊ¿ØÖÆ;ĬÈÏÇé¿öÊÇshow databasesÓï¾ä¶ÔËùÓÐÓû§¿ª·Å£¬
Èç¹ûmysql·þÎñÆ÷ûÓпªÔ¶³ÌÕÊ»§£¬¾ÍÔÚmy.iniÀïÃæ¼ÓÉÏskip-grant-tables
=====================================
Ôڸ߲¢·¢¸ßÁ÷Á¿µÄÇé¿öÏ£¬»ùÓÚÊý¾Ý¿âÇý¶¯µÄÓ¦ÓÃϵͳºÜÈÝÒ׳öÏÖÆ¿¾±£¬Õâ¸öÆ¿¾±Ê×ÏȾÍÊÇmax_connections£¬¼´Êý¾Ý¿âµÄͬʱ×î´óÁ¬½ÓÊý.ÔÚMySQL°²×°µÄʱºòĬÈÏÖ»ÓÐ100¸ö¡£Ôö´óÕâ¸öÁ¬½ÓÊýÄÜÂíÉÏÆðµ½Ð§¹û¡£µ«ÊDz¢²»ÊÇÄÜÎÞÏÞÁ¿Ôö¼Ó£¬ÎÒÔÚwindow·þÎñÆ÷ϺÍlinux·þÎñÆ÷Ï·ֱð×öÁËʵÑé¡£
=====================================
ÐÞ¸Ämy.cnf
1. ×¢Ê͵ô # skip-networking
2. ¸øMYSQL°ó¶¨IP bind-address = 123.45.67.89 # server IP address
=====================================
ÎÊÌâµÄ³öÏÖÊÇÕâÑùµÄ£¬ÎÒµÄÒ»¸öwebÓ¦ÓÃÖÐÓÐÒ»¸öÁбíÒ³Ã棬Óöµ½ÁËn+1ÎÊÌ⣬¾ÍÊÇ´ò¿ªÕâ¸öÒ³Ã棬ÁбíÖÐÓÐnÌõÐÅÏ¢£¬¾Í»á²úÉún+1Ìõsql¡£´ò¿ªÕâ¸öÒ³ÃæºÜÂý£¬ÐèÒª1·ÖÖӶࡣȻ¶ø£¬Õâ¸öÎÊÌâÖ»ÔÚ²âÊÔ»·¾³³öÏÖ£¬Éú²ú»·¾³ºÍ±¾µØ¿ª·¢»·¾³¾ùΪ³öÏÖ´ËÎÊÌâ¡£
¾¹ý¸ú×ٺͷÖÎö£¬·¢ÏÖÎÊÌâ³öÔÚ»ñÈ¡Á¬½ÓµÄʱºò£¬ÓÉÓÚûÓÐʹÓÃÁ¬½Ó³Ø£¬Õân+1Ìõsql£¬¾³£¾Í»áÓöµ½»ñÈ¡Á¬½ÓÂýµÄ¡£ÈçÏÂΪÈÕÖ¾£º
2009-11-23 13:41:20,679 INFO [Test] - -----------config------------
2009-11-23 13:41:20,695 INFO [Test] - url: jdbc:mysql://88.88.88.88:3306/xxxdatabase?useUnic
Ïà¹ØÎĵµ£º
½â¾ö·½·¨(ת)£º---µ«Ö´ÐеÚÒ»Öְ취ʱ³öÏÖ´íÎ󣬵ڶþÖÖ°ì·¨³É¹¦
1¡£¸Ä±í·¨¡£¿ÉÄÜÊÇÄãµÄÕʺŲ»ÔÊÐí´ÓÔ¶³ÌµÇ½£¬Ö»ÄÜÔÚlocalhost¡£Õâ¸öʱºòÖ»ÒªÔÚlocalhostµÄÄÇ̨µçÄÔ£¬µÇÈëmysqlºó£¬¸ü¸Ä "mysql" Êý¾Ý¿âÀïµÄ "user" ±íÀïµÄ "host" Ï´Ó"localhost"¸Ä³Æ"%"
mysql -u root -pvmwaremysql>use mysql;mysql>update use ......
mysql½Ì³Ì:¸ßÊÖÊÇÔõÑùÁ¶³ÉµÄ:¾«ÃîSQLÓï¾ä½éÉÜ
[ÈÕÆÚ£º2009-06-02] À´Ô´£º ×÷Õߣº
ÈçºÎ´Óһλ²ËÄñÍɱä³ÉΪ¸ßÊÖ£¬Áé»îʹÓõÄSQLÓï¾äÊDZز»¿ÉÉٵġ£±¾ÎÄÊÕ¼¯Á˲¿·Ö±È½Ï¾µä£¬³£ÓõÄSQLÓï¾ä¹©´ó¼Ò²Î¿¼£¬Ï£Íû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
¡¡¡¡ËµÃ÷£º¸´ÖƱí(Ö»¸´Öƽṹ,Ô´±íÃû£ºa бíÃû£ºb)¡¡¡¡
¡¡¡¡SQL: select * into ......
solarisÏÂmysql°²×°Íê±ÏºóÖ´ÐÐÈçϲÙ×÷£¬¿ÉÒÔÐÞ¸ÄÊý¾Ý¿â×Ö·û¼¯£¬ÉèÖÃMySQLÔÚSolarisÉϱíÃû²»Çø·Ö´óСд
1.¿½±´ÎļþÈçÏ£º
cp /usr/sfw/share/mysql/my-medium.cnf /etc/my.cnf
°ÑÎļþÖ»¶ÁÊôÐÔÈ¥µô
chmod +w my.cnf
2 ÉèÖÃmysqlµÄ×Ö·û¼¯£ºÔÚ/etc/my.cnfÖеÄmysqld¶ÎºÍclient¶Î¼ÓÈë´úÂ룺
[client]
de ......
ÎÊ£º
±ÈÈçÎÒÏëÖ±½ÓÔÚphp µÄ½Å±¾Àïдһ¸öÀàËÆ£¬install.phpµÄ½Å±¾
Õâ¸ö½Å±¾µÄ×÷ÓþÍÊÇ£¬Á¬½ÓmysqlÊý¾Ý¿â£¬²¢½¨Á¢ÎÒËùÏëÒª½¨Á¢µÄÊý¾Ý¿â£¬Êý¾Ý±í£¬ÒÔ¼°Ïà¹Ø×ֶΡ£
Çë¾ßÌåдһ¸öÀý×Ó£¬Ð»Ð»£¡
______________________________________________________________________________________________
´ð1£º
連½Ó·½· ......
Dos½øÈëMySqlµÄbinĿ¼,Ö´ÐУºmysqldump -hÔ¶³ÌÊý¾Ý¿âIP Êý¾Ý¿âÃû×Ö -uÔ¶³ÌÊý¾Ý¿âÓû§Ãû -pÔ¶³ÌÊý¾Ý¿âÃÜÂë --add-drop-table | mysql ±¾µØÊý¾Ý¿âÃû×Ö -u±¾µØÊý¾Ý¿âÓû§Ãû -p±¾µØÊý¾Ý¿âÃÜÂë
ÔÚ¾ÖÓòÍøÄÚ²âÊԳɹ¦ ......