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

MYSQL£ºCannot convert value '0000

½ñÌì´ÓMYSQLÊý¾Ý¿âץȡʱ£¬·¢ÉúÁËCannot convert value '0000-00-00 00:00:00' from column 10 to TIMESTAMPÒì³£
googleÁËһϣ¬´ó¸ÅÒâ˼ÊÇMySQLÖеÄDatetimeÖµÎÞ·¨ÔÙJAVAÖпɿ¿µÄ±»±íʾ£¬°´ÕÕJDBCºÍSQLµÄ±ê׼ĬÈÏÇé¿öϲúÉúÒì³£¡£
JDBCÔÊÐíÓÃÏÂÁеÄÖµ¶ÔzeroDateTimeBehavior ÊôÐÔÀ´ÉèÖÃÕâЩ´¦Àí·½Ê½£¬
exception (the default), which throws an SQLException with an SQLState of S1009. 
ÉèÖÃΪexception Òì³££¨È±Ê¡£©ÓÃÒ»¸öSQLStateµÄs1009´íÎóºÅÀ´Å׳öÒ»¸öÒì³£
convertToNull, which returns NULL instead of the date. 
ÉèÖÃΪconvertToNull£¬ÓÃNULLÖµÀ´´úÌæÕâ¸öÈÕÆÚÀàÐÍ
round, which rounds the date to the nearest closest value which is 0001-01-01. 
ÉèÖÃΪround£¬ÔòΧÈÆÕâ¸öÈÕÆÚ×î½Ó½üµÄÖµ£¨0001-01-01£©À´´úÌæ
Äã¿ÉÒÔÐÞ¸ÄÄãµÄjdbcÁ¬½Ó
jdbc:mysql://localhost:3306/NovelSiteDB?user=root&password=zjwilove4&zeroDateTimeBehavior=round
ÔËÐгɹ¦!
ת×Ô£ºhttp://blog.csdn.net/pjchen/archive/2008/04/19/2308245.aspx


Ïà¹ØÎĵµ£º

java µ÷ÓÃÃüÁî ±¸·ÝmysqlÊý¾Ý¿â

 ´úÂëÈçÏ£º
  1  String command  =   " cmd /c C:/Program Files/MySQL/MySQL Server 5.0/bin>mysqldump -h localhost -u root -p aijia > E:/aijia.dmp " ;
  2      try    {
  3     Process process& ......

java µ÷ÓÃmysql¿Í»§¶Ëµ¼È룬µ¼³öÊý¾Ý

 ×î½üÓöµ½Ò»¸öÐèÇóÒªÔÚlinuxÏÂÓÃjava µ÷ÓÃmysql¿Í»§¶ËÔ¶³ÌµÇ½mysql·þÎñÆ÷£¬´Ó¿Í»§¶Ë»úÆ÷µ¼Èëmysql½Å±¾£¬´Ómysql·þÎñÆ÷¶Ëµ¼³ö±íÖеÄÊý¾Ý¡£ÒÔÏÂÊÇÓõ½µÄÖ÷Òª·½·¨£º
Java ´úÂë 
/**  
 * µ¼ÈëÊý¾Ý  
  * @param  ½Å±¾µÄµØÖ·ºÍÃû³Æ  
 * @return ÊÇ·ñ³ ......

MYSQL Íâ¼ü¶¨ÒåÓëʹÓÃ

 
ÔÚMySQL 3.23.44°æ±¾ºó£¬InnoDBÒýÇæÀàÐ͵ıíÖ§³ÖÁËÍâ¼üÔ¼Êø¡£
Íâ¼üµÄʹÓÃÌõ¼þ£º
1.Á½¸ö±í±ØÐëÊÇInnoDB±í£¬MyISAM±íÔÝʱ²»Ö§³ÖÍâ¼ü£¨¾Ý˵ÒÔºóµÄ°æ±¾ÓпÉÄÜÖ§³Ö£¬µ«ÖÁÉÙÄ¿Ç°²»Ö§³Ö£©£»
2.Íâ¼üÁбØÐ뽨Á¢ÁËË÷Òý£¬MySQL 4.1.2ÒÔºóµÄ°æ±¾ÔÚ½¨Á¢Íâ¼üʱ»á×Ô¶¯´´½¨Ë÷Òý£¬µ«Èç¹ûÔÚ½ÏÔçµÄ°æ±¾ÔòÐèÒªÏÔʾ½¨Á¢£»
3.Íâ¼ü¹ØÏ ......

MySQL¿É¿¿ÐÔ·½°¸·ÖÎöÓë±È½Ï

ÒýÓÃhttp://bbs.yahunet.com/thread-9946-1-1.html
´Ó»ù±¾Çé¿ö¡¢³É±¾¡¢ÓÅȱµãºÍÓ¦Óó¡ºÏµÈ·½Ãæ¶Ô5ÖÖMySQLµÄ¿É¿¿ÐÔ·½°¸
½øÐÐÁË·ÖÎö
ºÍ±È½Ï£¬¶ÔMySQLµÄ¿ª·¢ºÍ¹ÜÀí
ÓÐÒ»¶¨µÄ½è¼ø×÷Óá£
1£®MySQL Clustering(ndb-cluster stogare)
¼ò½é£º
MySQL¹«Ë¾ÒÔ´æ´¢ÒýÇ淽ʽÌṩµÄ¸ß¿É¿¿ÐÔ·½°¸£¬ÊÇÊÂÎñ°²È«µÄ£¬ÊµÊ±¸´ÖÆÊý¾Ý
£¬¿ÉÓ ......

¹ØÓÚmysqlÖд¥·¢Æ÷Ö´Ðж¯Ì¬sqlµÄÎÊÌâ

    Õ⼸ÌìÊÖÍ·¿ª·¢µÄϵͳҪ×öÒ»¸öÀàËÆwindowsÕË»§µ½ÆÚʱ¼äµÄ¹¦ÄÜ£¬¿¼ÂÇÁË°ëÌìÏë³öÁËÒ»¸ö¼¼ÊõÉϺÍÂß¼­É϶¼»¹ÄÜʵÏֵĽâ¾ö·½°¸£º
´´½¨Ò»¸öÓû§´æÈëÊý¾Ý¿âµÄʱºò¶¼´´½¨Ò»¸öʼþµ÷¶ÈÆ÷À´¿ØÖÆÓû§µÄµ½ÆÚʱ¼ä£¨mysqlµÄʱ¼äµ÷¶ÈÆ÷ȷʵºÜ·½±ã£©¡£ÏëÆðÀ´ÊǺܼòµ¥£¬µ«ÊÇ×öÆðÀ´ÎÊÌâȷʵһ²¨½ÓÒ»²¨...
һЩСÎÊÌâ¾Í²» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ