railsʹÓÃsqlite3ºÍmysqlµÄÎÊÌâ
1¡¢Èç¹ûʹÓÃsqlite3ʱ³öÏÖÈçÏ´íÎó£º
/!\ FAILSAFE /!\ Thu Jul 30 22:16:15 +0800 2009
Status: 500 Internal Server Error
unknown error
c:/ruby/lib/ruby/1.8/dl/import.rb:29:in `initialize'
c:/ruby/lib/ruby/1.8/dl/import.rb:29:in `dlopen'
c:/ruby/lib/ruby/1.8/dl/import.rb:29:in `dlload'
c:/ruby/lib/ruby/1.8/dl/import.rb:27:in `each'
c:/ruby/lib/ruby/1.8/dl/import.rb:27:in `dlload'
c:/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.3-x86-mswin32/lib/sqlite3/driver/dl/api.rb:31
... ...
´ÓÍøÉÏÏÂÔØsqlite3.dll¡¢sqlite3.exe¿½±´µ½ÏµÍ³Ä¿Â¼Ï¼´¿É½â¾ö¡£
2¡¢Èç¹ûʹÓÃmysql£¬Ä¿Ç°rail2.3.3ÅäºÏmysql5±È½ÏÕý³££¬mysql6ÔÝʱÓÐЩÎÊÌâ¡£ÔÚ°²×°mysql5ºóÒª½«libmySQL.dll¿½±´µ½c:\ruby\binĿ¼Ï£¬±£Ö¤Çý¶¯¼ÓÔØÕýÈ·¡£
Ïà¹ØÎĵµ£º
ÓкܶàÅóÓÑËäÈ»°²×°ºÃÁËmysqlµ«È´²»ÖªÈçºÎʹÓÃËü¡£ÔÚÕâƪÎÄÕÂÖÐÎÒÃǾʹÓÁ¬½ÓMYSQL¡¢ÐÞ¸ÄÃÜÂë¡¢Ôö¼ÓÓû§µÈ·½ÃæÀ´Ñ§Ï°Ò»Ð©MYSQLµÄ³£ÓÃÃüÁî¡£
Ò»¡¢Á¬½ÓMYSQL¡£
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £pÓû§ÃÜÂë
1¡¢Àý1£ºÁ¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈÔÚ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼ mysqlbin£¬ÔÙ¼üÈëÃüÁîmysql -uroot -p£¬»Ø³µ ......
³£³£Óöµ½´óÊý¾ÝÁ¿Æµ·±¶ÁдÊƱػᵼÖ·þÎñÆ÷µÄÐÔÄÜϽµ¡£ÏÂÃæ¼Ç¼һ϶ÔmysqlµÄÓÅ»¯ÅäÖÃ
1.Ê×ÏȹرÕauto commit¡£
2.¶ÔÓÚÊý¾Ý±íʹÓÃInnoDB¡£
3.¹Ø±ÕÍâ¼üÔ¼Êø¡£
4.²ÉÓöàÖµ²åÈë“INSERT INTO ±íÃû VALUES (1,2), (5,5), ...;” Èç¹ûÓдóÁ¿²¢·¢¿ÉÒÔÓøü¸ÄINSERT INTOΪ INSERT DELAYED INTO¿ÉÒÔÔڳ̶ÈÉϽ⾠......
mysql³ö´íÁË,ÒÔÇ°ÍùÍù¿¿²Â.ÓÐÁËÕâÕűí,Ò»²é¾Í³öÀ´ÁË.·½±ã²»ÉÙ.Ìع²ÏíÓÚÖÚ
1005£º´´½¨±íʧ°Ü
1006£º´´½¨Êý¾Ý¿âʧ°Ü
1007£ºÊý¾Ý¿âÒÑ´æÔÚ£¬´´½¨Êý¾Ý¿âʧ°Ü
1008£ºÊý¾Ý¿â²»´æÔÚ£¬É¾³ýÊý¾Ý¿âʧ°Ü
1009£º²»ÄÜɾ³ýÊý¾Ý¿âÎļþµ¼ÖÂɾ³ýÊý¾Ý¿âʧ°Ü
1010£º²»ÄÜɾ³ýÊý¾ÝĿ¼µ¼ÖÂɾ³ýÊý¾Ý¿âʧ ......
ÔÚmysqlÊÖ²áÀïÃæÓÐÒ»¶ÎÃèÊö¹ØÓÚlock tablesµÄÓï·¨µÄ. LOCK TABLES
tbl_name [AS alias] {READ [LOCAL] | [LOW_PRIORITY] WRITE}
[, tbl_name [AS alias] {READ [LOCAL] | [LOW_PRIORITY] WRITE}] ...
UNLOCK TABLES
READ
µ±±í²»´æÔÚ WRITE дËøʱ READ ¶ÁËø±»Ö´ÐÐ,Õâ¸Ã ......
1¡¢mysql Êý¾Ý¿âûÓÐÔöÁ¿±¸·ÝµÄ»úÖÆ£¬µ±Êý¾ÝÁ¿Ì«´óµÄʱºò±¸·ÝÊÇÒ»¸öºÜ´óµÄÎÊÌâ¡£»¹ºÃ mysql Êý¾Ý¿âÌṩÁËÒ»ÖÖÖ÷´Ó±¸·ÝµÄ»úÖÆ£¬Æäʵ¾ÍÊÇ°ÑÖ÷Êý¾Ý¿âµÄËùÓеÄÊý¾Ýͬʱдµ½±¸·ÝÊý¾Ý¿âÖС£ÊµÏÖ mysql Êý¾Ý¿âµÄÈȱ¸·Ý¡£
¡¡¡¡2¡¢ÒªÏëʵÏÖË«»úµÄÈȱ¸Ê×ÏÈÒªÁ˽âÖ÷´ÓÊý¾Ý¿â·þÎñÆ÷µÄ°æ±¾µÄÐèÇó¡£ÒªÊµÏ ......