ÈçºÎÑ¡ÔñºÏÊʵÄmysql´æ´¢ÒýÇæ
ÔÚÑ¡Ôñ´æ´¢ÒýÇæʱ£¬Ó¦¸ù¾ÝÓ¦ÓÃÌصãÑ¡ÔñºÏÊʵĴ洢ÒýÇ棬¶ÔÓÚ¸´ÔÓµÄÓ¦ÓÃϵͳ¿ÉÒÔ¸ù¾Ýʵ¼ÊÇé¿öÑ¡Ôñ¶àÖÖ´æ´¢ÒýÇæ½øÐÐ×éºÏ¡£
ÏÂÃæÊdz£Óô洢ÒýÇæµÄÊÊÓû·¾³¡£
¡ñMyISAM:ĬÈϵÄMysql²å¼þʽ´æ´¢ÒýÇæ¡£Èç¹ûÓ¦ÓÃÊÇÒÔ¶ÁдºÍ²åÈë²Ù×÷ΪÖ÷£¬Ö»ÓкÜÉÙ¸üкÍɾ³ý²Ù×÷£¬²¢ÇÒ¶ÔÊÂÎñÍêÕûÐÔ£¬²¢·¢ÐÔÒªÇó²»ÊǺܸߣ¬ÄÇôѡÔñÕâ¸ö´æ´¢ÒýÇæ·Ç³£Êʺϵġ£MyISAMÊÇÔÚWeb£¬Êý¾Ý²Ö´¢ºÍÆäËûÓ¦Óû·¾³ÏÂ×î¾³£Ê¹ÓõĴ洢ÒýÇæÖ®Ò»
¡ñInnoDB:ÓÃÓÚÊÂÎñ´¦ÀíÓ¦ÓóÌÐò£¬Ö§³ÖÍâ¼ü¡£Èç¹ûÓ¦ÓöÔÊÂÎñµÄÍêÕûÐÔÓбȽϸߵÄÒªÇó£¬ÔÚ²¢·¢Ìõ¼þÏÂÒªÇóÊý¾ÝµÄÒ»ÖÂÐÔ£¬Êý¾Ý²Ù×÷³ýÁ˲åÈëºÍ²éѯÒÔÍ⣬»¹°üÀ¨ºÜ¶àµÄ¸üкÍɾ³ý²Ù×÷£¬ÄÇôinnoDB´æ´¢ÒýÇæÓ¦¸ÃÊDZȽϺÏÊʵÄÑ¡Ôñ¡£InnoDB´æ´¢ÒýÇæ³ýÁËÓÐЧµÄ½µµÍÓÉÓÚɾ³ýºÍ¸üе¼ÖµÄËø¶¨£¬»¹¿ÉÒÔÈ·±£ÊÂÎñµÄÍêÕûÌá½»£¨commit£©ºÍ»Ø¹ö£¨rollback£©£¬¶ÔÓÚÀàËƼƷÑϵͳ»òÕß²ÆÎñϵͳµÈ¶ÔÊý¾Ý׼ȷÐÔÒªÇó¸ßµÄϵͳ£¬InnoDBÊDZȽϺÏÊʵÄÑ¡Ôñ¡£
¡ñMEMORY£º½«ËùÓÐÊý¾Ý±£´æÔÚÄÚ´æÖУ¬ÔÚÐèÒª¿ìµÝ¶¨Î»¼Ç¼ºÍÆäËûÀàËÆÊý¾ÝµÄ»·¾³Ï£¬¿ÉÌṩ¼«¿ìµÄ·ÃÎÊ¡£MEMORY µÄȱÏÝÊǶԱíµÄ´óСÓÐÏÞÖÆ£¬Ì«´óµÄ±íÎÞ·¨cacheÔÚÄÚ´æÖУ¬Æä´ÎÊÇҪȷ±£±íµÄÊý¾Ý¿ÉÒÔ»Ö¸´£¬Êý¾Ý¿âÒì³£ÖÕÖ¹ºǫ́±íµÄÊý¾Ý¿ÉÒÔ»Ö¸´µÄ£¬MEMORYÖÐͨ³£ÓÃÓÚ¸üв»Ì«Æµ·±µÄС±í£¬ÓÃÓÚ¿ìËٵõ½·ÃÎʽá¹û¡£
¡ñMERGE£ºÓÃÓÚ½«Ò»ÏµÁеÈͬµÄMyISAM±íÒÔÂß¼·½Ê½×éºÏÔÚÒ»Æ𣬲¢×÷Ϊ¶ÔÏóÒýÓÃËûÃÇ£¬MERGE±íµÄÓеãÔÚÓÚ¿ÉÒÔÍ»ÆƶԵ¥¸öMyISAM±í´óСµÄÏÞÖÆ£¬²¢Í¨¹ý½«²»Í¬µÄ±í·Ö²¼ÔÚ¶à¸ö´ÅÅÌÉÏ£¬¿ÉÒÔÓÐЧµÄ¸ÄÉÆMERGE±íµÄ·ÃÎÊЧÂÊ¡£Õâ¶ÔÓëÖîÈçÊý¾Ý²Ö´¢µÈVLDB»·¾³Ê®·ÖÊʺϡ£
Ïà¹ØÎĵµ£º
cmdÏÂÇл»µ½ mysql °²×°Ä¿Â¼
Àý
d:/mysql/bin
(Èç¹ûÓÃWAMP°²×°ÔòÊÇD:\wamp\bin\mysql\mysql5.1.30\bin)
Ç°Ì᣺mysqlÓû§rootÃÜÂëΪ¿Õ.
Êä
Èë mysql -u root mysql
mysql> ״̬ÏÂÊäÈë
update user set password=password('ÐÂÃÜÂë') where user='root';
ȯ
ÏÔ
Quer ......
1,Íü¼ÇrootÃÜÂë,Èç¹ûÄÜ»¹ÄܽøÈëmysqlÇÒ»¹ÓÐmysql¿âµÄȨÏÞ,ÄÇô¾ÍÖ±½ÓÖ´ÐÐ update user set password=password(¡®XXX¡¯) where user=¡¯root¡¯ and host=¡¯XX¡¯; flush privileges; ¼´¿É.Èç¹û²»ÄܽøÈëmysql,ÐèÒªÓÐmysqlÆô¶¯µÄȨÏÞ,ÔÚÆô¶¯mysqlµÄʱºò¼ÓÉÏ--skip-grant-tablesÑ¡Ïî,´Ëʱ½øÈëmysqlÎÞÐèÃÜÂë,ÔÙÖظ´ÉÏÊö²Ù ......
½ñÌìÔÚ°ïÅóÓѵ÷ÊÔÒ»¸ö¹ØÓÚ¶àÏ̷߳ÃÎÊͬһÕűíÒýÆðµÄLock wait timeout exceedeµÄÎÊÌ⣬¸Ð¾õÒýÆðµÄÔÒòÓУº
1£¬Ã»ÓнøÐÐÓÅ»¯£¬¾¡Á¿±ÜÃâ¶àÏß³Ì
2£¬¸ù¾ÝËüºóÃ汨µÄÒì³££¬ÌáÐÑÎÒ¿ÉÒÔHibernate µÄSessionûÓÐʹÓõõ±£¬(Ò²ÊÇÎÒ½â¾öµÄ·½°¸)
3£¬ÓÃsynchronizedÐÞÊθüбíµÄº¯Êý
¹À¼ÆÊÇÔÀ´³ÌÐòÔÚÐÞ¸ÄÍê¸Ã±íʱÁ¢¿Ì½øÐÐÁ˲åÈë²Ù× ......
ÔÚZend FrameWorkÖе÷ÓÃmysqlµÄ´æ´¢¹ý³Ì·½·¨ÈçÏ£º
$db = Zend_Db::factory($sql_DbType,$sql_Config);
$connection=$db->getConnection();
Zend_Registry::set("db",$db);
Zend_Registry::set("connect",$connection);
µ÷Óô洢¹ý³ÌÈçÏ´úÂëËùʾ£º
$this->_db = Zend_Registry::get('db');
$connection=Zend_ ......
1£® °²×°Cygwin
ÔËÐÐCygwinµÄ°²×°³ÌÐò¡£´ÓÎļû°üµÄµÄÁбíÖУ¬ÔÚDEVÀïÃ棬ȷ¶¨ÒªÑ¡Ôñ
• Ruby
• gcc
• subversion
ÄãÐèҪʹÓÃgccÀ´½¨Á¢Cygwin°æ±¾µÄMySQL.
2. ÔÚwindowsÉÏÃæ°²×°MYSQL£º
download MySQL 5.0 Windows Installer
3£® & ......