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

MySQLÓëÊÂÎñ (ת)

MySQL5.X¶¼ÒѾ­·¢²¼ºÃ¾ÃÁË£¬µ«ÊÇ»¹ÓкܶàÈËÈÏΪMySQLÊDz»Ö§³ÖÊÂÎñ´¦ÀíµÄ£¬Õâ²»µÃ²»¹ÖËûÃÇÊǹª¹ÑÎŵģ¬Æäʵ£¬Ö»ÒªÄãµÄMySQL°æ±¾
Ö§³ÖBDB»òInnoDB±íÀàÐÍ£¬ÄÇôÄãµÄMySQL¾Í¾ßÓÐÊÂÎñ´¦ÀíµÄÄÜÁ¦¡£ÕâÀïÃ棬ÓÖÒÔInnoDB±íÀàÐÍÓõÄ×î¶à£¬ËäÈ»ºóÀ´·¢ÉúÁËÖîÈçOracleÊÕ
¹ºInnoDBµÈÁîMySQL²»Ë¬µÄÊÂÇ飬µ«ÄÇЩÉÌÒµÉϵĶ·ÕùÓë¼¼ÊõÎ޹أ¬ÏÂÃæÒÔInnoDB±íÀàÐÍΪÀý¼òµ¥ËµÒ»ÏÂMySQLÖеÄÊÂÎñ¡£
ÏÈÀ´Ã÷È·Ò»ÏÂÊÂÎñÉæ¼°µÄÏà¹Ø֪ʶ£º
ÊÂÎñ¶¼Ó¦¸Ã¾ß±¸ACIDÌØÕ÷¡£ËùνACIDÊÇAtomic£¨Ô­×ÓÐÔ£©£¬Consistent£¨Ò»ÖÂÐÔ£©£¬Isolated£¨¸ôÀëÐÔ£©£¬Durable£¨³ÖÐøÐÔ£©Ëĸö´ÊµÄÊ××ÖĸËùд£¬ÏÂÃæÒÔ“ÒøÐÐתÕʔΪÀýÀ´·Ö±ð˵Ã÷Ò»ÏÂËüÃǵĺ¬Ò壺
Ô­×ÓÐÔ£º×é³ÉÊÂÎñ´¦ÀíµÄÓï¾äÐγÉÁËÒ»¸öÂß¼­µ¥Ôª£¬²»ÄÜÖ»Ö´ÐÐÆäÖеÄÒ»²¿·Ö¡£»»¾ä»°Ëµ£¬ÊÂÎñÊDz»¿É·Ö¸îµÄ×îСµ¥Ôª¡£±ÈÈ磺ÒøÐÐתÕʹý³ÌÖУ¬±ØÐëͬʱ´ÓÒ»¸öÕÊ»§¼õȥתÕʽð¶î£¬²¢¼Óµ½ÁíÒ»¸öÕÊ»§ÖУ¬Ö»¸Ä±äÒ»¸öÕÊ»§ÊDz»ºÏÀíµÄ¡£
Ò»ÖÂÐÔ£ºÔÚÊÂÎñ´¦ÀíÖ´ÐÐÇ°ºó£¬Êý¾Ý¿âÊÇÒ»Öµġ£Ò²¾ÍÊÇ˵£¬ÊÂÎñÓ¦¸ÃÕýÈ·µÄת»»ÏµÍ³×´Ì¬¡£±ÈÈ磺ÒøÐÐתÕʹý³ÌÖУ¬ÒªÃ´×ªÕʽð¶î´ÓÒ»¸öÕÊ»§×ªÈëÁíÒ»¸öÕÊ»§£¬ÒªÃ´Á½¸öÕÊ»§¶¼²»±ä£¬Ã»ÓÐÆäËûµÄÇé¿ö¡£
¸ôÀëÐÔ£ºÒ»¸öÊÂÎñ´¦Àí¶ÔÁíÒ»¸öÊÂÎñ´¦ÀíûÓÐÓ°Ïì¡£¾ÍÊÇ˵ÈκÎÊÂÎñ¶¼²»¿ÉÄÜ¿´µ½Ò»¸ö´¦ÔÚ²»ÍêÕû״̬ϵÄÊÂÎñ¡£±ÈÈç˵£¬ÒøÐÐתÕʹý³ÌÖУ¬ÔÚתÕÊÊÂÎñûÓÐÌύ֮ǰ£¬ÁíÒ»¸öתÕÊÊÂÎñÖ»ÄÜ´¦Óڵȴý״̬¡£
³ÖÐøÐÔ£ºÊÂÎñ´¦ÀíµÄЧ¹ûÄܹ»±»ÓÀ¾Ã±£´æÏÂÀ´¡£·´¹ýÀ´Ëµ£¬ÊÂÎñÓ¦µ±Äܹ»³ÐÊÜËùÓеÄʧ°Ü£¬°üÀ¨·þÎñÆ÷¡¢½ø³Ì¡¢Í¨ÐÅÒÔ¼°Ã½Ìåʧ°ÜµÈµÈ¡£±ÈÈ磺ÒøÐÐתÕʹý³ÌÖУ¬×ªÕʺóÕÊ»§µÄ״̬ҪÄܱ»±£´æÏÂÀ´¡£
ÔÙÀ´¿´¿´ÄÄЩÎÊÌâ»áÓõ½ÊÂÎñ´¦Àí£º
ÕâÀﲻ˵“ÒøÐÐתÕÊ”µÄÀý×ÓÁË£¬ËµÒ»¸ö´ó¼Òʵ¼Ê¸üÈÝÒ×Óöµ½µÄ“ÍøÉϹºÊ锵ÄÀý×Ó¡£ÏȼÙÉèÒ»ÏÂÎÊÌâµÄ±³¾°£ºÍøÉϹºÊ飬ijÊ飨Êý¾Ý¿â±àºÅΪ123£©Ö»Ê£×îºóÒ»±¾£¬¶øÕâ¸öʱºò£¬Á½¸öÓû§¶ÔÕâ±¾Ê鼸ºõͬʱ·¢³öÁ˹ºÂòÇëÇó£¬ÈÃÎÒÃÇ¿´¿´Õû¸ö¹ý³Ì£º
ÔÚ¾ßÌå·ÖÎö֮ǰ£¬ÏÈÀ´¿´¿´Êý¾Ý±íµÄ¶¨Ò壺
-------------------------------------------------------------------------------
create table book
(
    book_id unsigned int(10) not null auto_increment,
    book_name varchar(100) not null,
    book_price float(5, 2) not null, #ÎÒ¼ÙÉèÿ±¾ÊéµÄ¼Û¸ñ²»»á³¬¹ý999.99Ôª


Ïà¹ØÎĵµ£º

mysql״̬ status

http://blog.163.com/mysqldba@126/blog/static/1315356342009931103834396/
×î½ü¿´ÁË¿´mysqlµÄ״̬±äÁ¿£¬¸Ð¾õºÃ¶à¸úÒÔÇ°×Ô¼ºÏëÏóµÄ²»Ò»Ñù¡£ÎªÁËÒÔºóÄܼ°Ê±·¢ÏÖ×Ô¼ºµÄ´íÎó,¾ÍÏȼÇÏÂÀ´;
http://dev.mysql.com/doc/refman/5.1/en/server-status-variables.html
mysql> show status;
Com_xxx
Óï¾ä¼ÆÊý±äÁ¿±íʾÿ¸öxxx ......

ÓÅ»¯MySQL²åÈë·½·¨µÄÎå¸öÃîÕÐ


ÒÔÏÂÊÇÉæ¼°µ½²åÈë±í¸ñµÄ²éѯµÄ5ÖָĽø·½·¨£º
1)ʹÓÃLOAD DATA INFILE´ÓÎı¾ÏÂÔØÊý¾ÝÕ⽫±ÈʹÓòåÈëÓï¾ä¿ì20±¶¡£
2)ʹÓôøÓжà¸öVALUESÁбíµÄINSERTÓï¾äÒ»´Î²åÈ뼸ÐÐÕ⽫±ÈʹÓÃÒ»¸öµ¥ÐвåÈëÓï¾ä¿ì¼¸±¶¡£µ÷Õûbulk_insert_buffer_size±äÁ¿Ò²ÄÜÌá¸ß£¨Ïò°üº¬Ðеıí¸ñÖУ©²åÈëµÄËٶȡ£
3)¿ÉÒÔ¶Ômyisam±í²¢ÐвåÈëConcurrent_i ......

MYSQL my.cnfÅäÖÃÖÐÎÄÏê½â

MYSQL--my.cnfÅäÖÃÖÐÎÄÏê½â ZZ2007Äê08ÔÂ16ÈÕ ÐÇÆÚËÄ 15:53mysqld³ÌÐò--Ŀ¼ºÍÎļþ
ÒýÓÃ
basedir = path   ʹÓøø¶¨Ä¿Â¼×÷Ϊ¸ùĿ¼(°²×°Ä¿Â¼)¡£
character-sets-dir = path   ¸ø³ö´æ·Å×Å×Ö·û¼¯µÄĿ¼¡£
datadir = path   ´Ó¸ø¶¨Ä¿Â¼¶ÁÈ¡Êý¾Ý¿âÎļþ¡£
pid-file = filename   Î ......

¾ßÓиºÔؾùºâ¹¦ÄÜMySQL·þÎñÆ÷¼¯Èº²¿ÊðʵÏÖ

À´×Ô£ºhttp://it.china-b.com/zx/linuxsjk/20090525/24129_1.html
ÕªÒª£ºMySQLÊÇÒ»¸ö¸ßËٶȡ¢¸ßÐÔÄÜ¡¢¶àÏ̵߳ĹØϵÐÍÊý¾Ý¿â
ÖÎÀíϵͳ£¬ÊÊÓÃƽ̨¶à£¬¿ÉÀ©Õ¹ÐÔÇ¿¡£ÔÚʵ¼ÊÉú²ú»·¾³ÖУ¬²¿ÊðºÍʵÏÖ¾ßÓÐÒ»¶¨¸ºÔؾùºâ¹¦ÄܵÄMySQL·þÎñÆ÷¼¯Èº£¬¶ÔÓÚÌá¸ßÓû§Êý¾Ý¿â
Ó¦ÓÃϵͳµÄÐÔÄÜ¡¢ËٶȺÍÎȶ¨ÐÔ¾ßÓÐÃ÷ÏÔµÄ×÷Óᣱ¾ÎļòÒª½éÉÜÁËÔÚ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ