mysql ´æ´¢ÒýÇæ
Õâ¶Îʱ¼äÔÚ¿´¡¶High Performance MySQL¡·£¬¿´µ½´æ´¢ÒýÇæÕâ¸öµØ·½¸Ðµ½ºÜ¶àϸ½Ú±È½ÏÄ°Éú£¬ËùÒÔ×ܽáС¼ÇһЩ
ΪÁËÊÊÓ¦¸÷ÖÖ²»Í¬µÄÔËÐл·¾³£¬MYSQLÌṩÁ˶àÖÖ²»Í¬µÄ´æ´¢ÒýÇ棨Storage Engine
£©,ÔÚÓ¦ÓóÌÐò¿ª·¢Õâ¸ö²ãÃæÉÏ£¬¿ª·¢Õß¿ÉÒÔ¸ù¾Ý²»Í¬µÄÐèÇóÑ¡ÔñÊʺϵÄStorage Engine
·½°¸£¬¸üΪÁé»îµÄÊÇ£¬Äã¿ÉÒÔ¸ù¾ÝÿÕÅ±í½«Òª´æ´¢Êý¾ÝµÄÌص㣬ѡÔñ²»Í¬µÄStorage
Engine,Ò²¾ÍÊÇ˵£¬ÔÚÒ»¸öMYSQLÊý¾Ý¿âÖУ¬¿ÉÒÔ»ìºÏʹÓöàÖÖ²»Í¬µÄStorage Engine
Ê×ÏÈСƳһÏÂMySQLµÄÌåϵ½á¹¹£¬ÔÚ×î¸ß³éÏó²ã¶ÈÏ£¬¿ÉÒÔÓÃGarlan & ShawµÄ·Ö²ã½á¹¹ÌåϵÀ´±íʾ£¨×ó£©
ÆäÖÐÓ¦ÓòãΪËùÓÐRDBMSÓû§ÌṩÓû§½Ó¿Ú£¬Âß¼²ã°üÀ¨ÁËËùÓкËÐŦÄܵÄʵÏÖ£¬ÎïÀí²ãÔò¸ºÔð½«Êý¾Ý´æ´¢ÔÚÓ²¼þÉ豸ÉÏ¡£
ͼÖÐÓÒ²à¸üΪ¾ßÌåµÄÃèÊöÁËÂß¼²ãµÄ×é³É£¬²éѯ´¦Àí×Óϵͳ¡¢ÊÂÎñ¹ÜÀí×Óϵͳ¡¢»Ö¸´¹ÜÀí×ÓϵͳºÍ´æ´¢¹ÜÀí×Óϵͳ¹²Í¬×é³ÉÁËMySQLµÄÂß¼²ã¡£ÏàÐÅ
Storage EngineµÄλÖÃÊÇÔÚStorage Management´¦£¬¼ÈStorage EngineÊôÓÚStorage
Management×ÓϵͳµÄÒ»²¿·Ö
ΪÁËÈÃ˼·¸üÇåÎúһЩ£¬ÏÂÃæ¸ø³öÒ»·ù±È½ÏÈ«ÃæµÄÌåϵ½á¹¹Í¼£¨»ò¸üÈ·ÇеÄ˵ÊÇÁ÷³Ìͼ£¬Ö»ÊǺöÂÔÁË·´À¡£©
ÉÏÃæÈý·ùͼÀ´×ÔÓÚһƪ·Ç¹Ù·½£¨²»±£Ö¤°Ù·Ö°ÙµÄÕýÈ·£©µÄMySQLÌåϵ½á¹¹µÄ±¨¸æ£¬Ó롶High Performance
MySQL¡·Ò»ÊéÖиø³öµÄMySQL´óÌå½á¹¹£¨ÏÂͼ,»ù±¾¶ÔÓ¦ÓÚLogic Layer£¬´ÓµÚÒ»·ùͼÓÒ²à¿ÉÒÔ¿´³öMySQL logic
layerͬÑù×ñ´Ó·Ö²ãÌåϵ½á¹¹£©»¹ÊDZȽÏÎǺϵġ£
Á¬½ÓÉÏͼÖеڶþ²ãºÍµÚÈý²ãÖ®¼äµÄ½Ó¿ÚÊDz¢²»Õë¶ÔÈκδ洢ÒýÇæµÄµ¥Ò»API,.´ó¸ÅÓÉ20¸ö»ù±¾µÄÀàËÆ“Æô¶¯ÊÂÎñ£¬·µ»Ø½á¹û¼¯”µÈº¯Êý×é³É¡£´æ´¢ÒýÇæ²¢²»´¦ÀíSQL£¬Ï໥֮¼äÒ²²»Í¨ÐÅ£¬ËüÃǵÄÈÎÎñÖ»ÊǼòµ¥µÄÏìÓ¦¸ß²ã´«À´µÄÇëÇó¡£
´æ´¢ÒýÇæ¸÷×ÔµÄһЩÌصã
ÉÏÃæÌáµ½µÄËÄÖÖ´æ´¢ÒýÇ涼Óи÷×ÔÊÊÓõĻ·¾³£¬ÕâÈ¡¾öÓÚËüÃǶÀÓеÄһЩÌØÕ÷¡£Ö÷ÒªÌåÏÖÔÚÐÔÄÜ¡¢ÊÂÎñ¡¢²¢·¢¿ØÖÆ¡¢²ÎÕÕÍêÕûÐÔ¡¢»º´æ¡¢ ¹ÊÕϻָ´£¬±¸·Ý¼°»Ø´æµÈ¼¸¸ö·½Ãæ
Ä¿Ç°±È½ÏÆÕ¼°µÄ´æ´¢ÒýÇæÊÇMyISAMºÍInnoDB.¶øMyISAMÓÖÊǾø´ó²¿·ÖWebÓ¦ÓõÄÊ×Ñ¡¡£MyISAMÓëInnoDBµÄÖ÷ÒªµÄ²»Í¬µãÔÚÓÚÐÔÄܺÍÊÂÎñ¿ØÖÆÉÏ¡£
MyISAMÊÇÔçÆÚISAM(Indexed Sequential Access
Method,ÎÒÏÖÔÚÓõÄMySQL5.0ÒѾ²»Ö§³ÖISAMÁË£©µÄÀ©Õ¹ÊµÏÖ£¬ISAM±»Éè¼ÆΪÊʺϴ¦Àí¶ÁƵÂÊÔ¶´óÓÚдƵÂÊÕâÑùÒ»ÖÖÇé¿ö£¬Òò´ËISAMÒÔ
¼°ºóÀ´µÄMyISAM¶¼Ã»Óп¼ÂǶÔÊÂÎïµÄÖ§³Ö£¬ÅųýÁËTPM£¬²»ÐèÒªÊÂÎñ¼Ç¼£¬ISAMµÄ²éѯЧÂÊÏ൱¿É¹Û£¬¶øÇÒÄÚ´æÕ¼ÓúÜÉÙ¡£MyISAMÔڼ̳ÐÁËÕâÀà
ÓŵãµÄͬʱ£¬Óëʱ¾ã
Ïà¹ØÎĵµ£º
£¨1£©Æô¶¯
MySQL°²×°Íê³ÉºóÆô¶¯ÎļþmysqlÔÚ/etc/init.dĿ¼Ï£¬ÔÚÐèÒªÆô¶¯MySQL·þÎñʱÔËÐÐÏÂÃæÃüÁî¼´¿É¡£ [root@test1 init.d]# /etc/init.d/mysql start
£¨2£©Í£Ö¹
/usr/bin/mysqladmin -u root -p shutdown
£¨3£©ÉèÖÃMySQL×Ô¶¯Æô¶¯
1£©²ì¿´mysqlÊÇ·ñÔÚ×Ô¶ ......
½ñÌìºÍһλ¼Ü¹¹Ê¦ÁÄÁËһЩÎÊÌ⣬ºÜżȻµÄ˵³öÁËÒ»¸öÊÂÇ飬ÎұȽϸÐÐËȤÓÚÊǼǼһÏ£º
1£ºÎÒÃǶ¼ÖªµÀmysqlÏ µÄINNODBºÍMYISAMÁ½ÖÖÒýÇ棬ÆäÖÐINNODB¾ßÓÐÊÂÎï¹ÜÀí¡£ËùÒÔINNODBϲÙ×÷ºÍMYISAMϲÙ×÷£¬µ¥´¿µÄ´Ó²åÈëÊý¾Ý¿âÉÏ˵£¬INNDODBµÄ¿É¿¿£¬²éѯÉÏ˵MYISAMµÄÒª¿ì¡£
2£º»ùÓÚÉÏÃæµÄÌØÐÔ£¬ÒÔ¼°MYSQLjuyouµÄÖ÷´Ó»úÖÆ£¬ÎÒÃÇ¿ÉÒ ......
¡¡¡¡1006£ºMYSQL ´´½¨Êý¾Ý¿âʧ°Ü ......
Äã¿ÉÒÔ´´½¨Ò»¸öÎı¾Îļþ“pet.txt”£¬Ã¿Ðаüº¬Ò»¸ö¼Ç¼£¬Óö¨Î»·û(tab)°ÑÖµ·Ö¿ª£¬²¢ÇÒÒÔCREATE TABLEÓï¾äÖÐÁгöµÄÁдÎÐò¸ø³ö¡£¶ÔÓÚ¶ªÊ§µÄÖµ(ÀýÈçδ֪µÄÐԱ𣬻òÈÔÈ»»î×ŵĶ¯ÎïµÄËÀÍöÈÕÆÚ)£¬Äã¿ÉÒÔʹÓÃNULLÖµ¡£ÎªÁËÔÚÄãµÄÎı¾ÎļþÖбíʾÕâЩÄÚÈÝ£¬
ʹÓÃ\N£¨·´Ð±Ïߣ¬×ÖĸN£©¡£ÀýÈ磬WhistlerÄñµÄ¼Ç¼ӦΪ(ÕâÀïÖµÖ® ......
µÇ¼mysql slave·þÎñÆ÷£¬Ö´ÐÐshow slave statusÃüÁһ°ãÏÔʾÒÔϲÎÊýµÄ״̬£»
Slave_IO_State: Waiting for master to send event
Master_Host:192.168.0.1
Master_User:repl_user
Master_Port:3306
Connect_Retry:60
Master_Log_File:mysql-bin.000010
Read_Master_Log_Pos:2562541
Relay_Log_File:mysql-r ......