Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

php¡¢MySqlÔËÐл·¾³

ÕâÀï½éÉÜÒ»¸ö¼¯³É»·¾³ XAMPP¡£
XAMPP ÊÇÒ»¸öÒ×ÓÚ°²×°ÇÒ°üº¬ MySQL¡¢PHP ºÍ Perl µÄ Apache ·¢Ðа档XAMPP µÄÈ··Ç³£ÈÝÒ×°²×°ºÍʹÓãºÖ»ÐèÏÂÔØ£¬½âѹËõ£¬Æô¶¯¼´¿É¡£
ÏÂÔصØÖ·£º
http://www.apachefriends.org/zh_cn/xampp.html
µ½Ä¿Ç°ÎªÖ¹£¬XAMPP ¹²ÓÐÒÔÏÂËÄÖÖ°æ±¾£º
£¨1£©ÊÊÓÃÓÚ Linux µÄ XAMPP
£¨2£©ÊÊÓÃÓÚ Windows µ ......

Ô¶³ÌÁ¬½Ómysql

½â¾ö·½·¨(ת)£º---µ«Ö´ÐеÚÒ»Öְ취ʱ³öÏÖ´íÎ󣬵ڶþÖÖ°ì·¨³É¹¦
1¡£¸Ä±í·¨¡£¿ÉÄÜÊÇÄãµÄÕʺŲ»ÔÊÐí´ÓÔ¶³ÌµÇ½£¬Ö»ÄÜÔÚlocalhost¡£Õâ¸öʱºòÖ»ÒªÔÚlocalhostµÄÄÇ̨µçÄÔ£¬µÇÈëmysqlºó£¬¸ü¸Ä "mysql" Êý¾Ý¿âÀïµÄ "user" ±íÀïµÄ "host" Ï´Ó"localhost"¸Ä³Æ"%"
mysql -u root -pvmwaremysql>use mysql;mysql>update use ......

mysqlÖÐÎÄÂÒÂë²úÉúÔ­ÒòºÍ½â¾ö°ì·¨

Ò»¡¢ÂÒÂë²úÉúÔ­Òò
mysql×Ö·û±àÂëÊÇ°æ±¾4.1ÒýÈëµÄ,Ö§³Ö¶à¹úÓïÑÔ,¶øÇÒһЩÌØÐÔÒѾ­³¬¹ýÁËÆäËûµÄÊý¾Ý¿âϵͳ¡£¿ÉÒÔÔÚMySQL Command Line Client ÏÂÊäÈëÈçÏÂÃüÁî²é¿´mysqlµÄ×Ö·û¼¯
mysql> SHOW CHARACTER SET;
+----------+-----------------------------+---------------------+--------+
| Charset   | Descr ......

mysql 5.0´æ´¢¹ý³Ìѧϰ×ܽá

 
mysql 5.0´æ´¢¹ý³Ìѧϰ×ܽá
Ò».´´½¨´æ´¢¹ý³Ì
1.»ù±¾Óï·¨£º
create procedure
sp_name()
begin
………
end
2.²ÎÊý´«µÝ
¶þ.µ÷Óô洢¹ý³Ì
1.»ù±¾Óï·¨£ºcall
sp_name()
×¢Ò⣺´æ´¢¹ý³ÌÃû³ÆºóÃæ±ØÐë¼ÓÀ¨ºÅ£¬ÄÄŸô洢¹ý³ÌûÓвÎÊý´«µÝ
Èý.ɾ³ý´æ´¢¹ý³Ì
1.»ù±¾Óï·¨£º
drop procedure ......

ËÄÖÖÔÚMySQLÖÐÐÞ¸ÄrootÃÜÂëµÄ·½·¨

 <>ÕûÀíÁËÒÔÏÂËÄÖÖÔÚMySQLÖÐÐÞ¸ÄrootÃÜÂëµÄ·½·¨,¿ÉÄܶԴó¼ÒÓÐËù°ïÖú!
·½·¨1£º ÓÃSET PASSWORDÃüÁî
¡¡¡¡mysql -u root
¡¡¡¡mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');
·½·¨2£ºÓÃmysqladmin
 
¡¡¡¡mysqladmin -u root password "newpass"
¡¡¡¡Èç¹ûrootÒѾ­ÉèÖà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ