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

hibernate+mysql Á¬½Ó³¬Ê±½â¾ö°ì·¨Ò»£¬£¨ÍøÉÏÕҵģ©


½â¾öhibernate+mysql³öÏֵĸôÌìÁ¬½Ó³¬Ê±ÎÊÌâ
³öÏÖ´íÎó£ºSQL Error: 0, SQLState: 08S01
Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Software caused connection abort: socket write error
STACKTRACE:
java.net.SocketException: Software caused connection abort: socket write error
** END NESTED EXCEPTION **
Last packet sent to the server was 0 ms ago
ÎÊÌâ³öÏÖÔ­Òò
mysqlĬÈÏΪ8Сʱºó×Ô¶¯Ïû³ý¿ÕÏÐÁ¬½Ó£¬¶øhibernateĬÈÏ¿ÕÁ¬½Ó³¬Ê±Ê±¼ä´óÓÚÕâ¸öÊý¡£
½â¾ö·½·¨
1.ÕÒµ½mysql5.0Ŀ¼ÏµÄmy.iniÎļþ£¬ÔÚ×îµ×´¦£¨»òÈÎÒâλÖã©Ìí¼Ówait_timeout =60£¨60Ϊ×Ô¶¨ÒåÖµ£©
2.ÓÃc3p0´úÌæhibernateµÄÁ¬½Ó³Ø¡£c3p0.9.1.jar¿É´Óhibernate¿ªÔ´ÏîÄ¿µÄlibÏÂÃæÕÒµ½£¬½«Æ俽±´µ½web-inf/libÏÂÃæ¡£ÔÚhibernate.cfg.xmlÅäÖÃÎļþÖÐÌí¼ÓÒÔÏÂÐÅÏ¢£º
<property name="hibernate.c3p0.min_size">2</property>
        <property name="hibernate.c3p0.timeout">5000</property>
        <property name="hibernate.c3p0.max_statements">100</property>
        <property name="hibernate.c3p0.idle_test_period">3000</property>
        <property name="hibernate.c3p0.acquire_increment">2</property>
        <property name="hibernate.c3p0.validate">false</property>
ÆäÖÐhibernate.c3p0.timeoutÊôÐÔÖ¸¶¨¶àÉÙÃëºóÁ¬½Ó³¬Ê±£¬Á¬½Ó³Ø»á×Ô¶¯¶Ô³¬Ê±Á¬½Ó½øÐÐÖز顣


Ïà¹ØÎĵµ£º

mysql ±¸·ÝºÍ»Ö¸´²ßÂÔ

mysql ±¸·ÝºÍ»Ö¸´²ßÂÔ
ÎÄÕ·ÖÀà:Êý¾Ý¿â
ÔÚÊý¾Ý¿â±í¶ªÊ§»òË𻵵ÄÇé¿öÏ£¬±¸·ÝÄãµÄÊý¾Ý¿âÊǺÜÖØÒªµÄ¡£Èç¹û·¢Éúϵͳ±ÀÀ££¬Äã¿Ï¶¨ÏëÄܹ»½«ÄãµÄ±í¾¡¿ÉÄܶªÊ§×îÉÙµÄÊý¾Ý»Ö¸´µ½±ÀÀ£·¢ÉúʱµÄ״̬¡£±¾ÎÄÖ÷Òª¶ÔMyISAM±í×ö±¸·Ý»Ö¸´¡£
 
±¸·Ý²ßÂÔÒ»£ºÖ±½Ó¿½±´Êý¾Ý¿âÎļþ£¨²»ÍƼö£©
±¸·Ý²ßÂÔ¶þ£ºÊ¹ÓÃmysqlhotcopy±¸·ÝÊý¾Ý¿â£ ......

mysql ÅäÖÃÎļþ

mysqlµÄÅäÖÃÎļþͨ³£ÃüÃûΪmy.cnf,Èç¹û±£´æÔÚĬÈϵÄ/etc/my.cnfĿ¼ÏÂ,ÄÇôÕâÀïÃæµÄÅäÖÃÊÇÈ«¾ÖµÄ,¼È¶Ô´Ë·þÎñÆ÷ÉϵÄËùÓÐmysql·þÎñÆ÷¶¼ÊÇÓÐЧµÄ(Èç¹ûÄãÓÐÔÚЩ·þÎñÆ÷ÉÏ°²×°Á˶à¸ömysql).Èç¹ûÖ»ÊDZ£´æÔÚij¸ömysql·þÎñÆ÷µÄÊý¾ÝĿ¼ÏÂ,ÔòÖ»¶Ô¸Ãmysql·þÎñÆ÷²úÉú×÷ÓÃ.Èç¹ûÊDZ£´æÔÚij¸öÓû§(µ±È»ÊÇmysqlÓû§)µÄhomeĿ¼ÏÂ,ÔòÖ»ÊÇÔÚmy ......

MysqlÖ÷´Ó·þÎñÆ÷µÄÅäÖñʼÇ

×¢: ´ÓMySQL´Ó·þÎñÆ÷µÄ°æ±¾²»ÄÜСÓÚÖ÷·þÎñÆ÷µÄ°æ±¾ ʵÑé»·¾³ Master Mysql·þÎñÆ÷°æ±¾5.1.36,IP:192.168.128.130 Slave Mysql·þÎñÆ÷°æ±¾5.1.36,IP:192.168.128.132 Ò». MySQLÖ÷·þÎñÆ÷ÅäÖà 1.½¨Á¢ÊÚȨÓû§ Ó÷¨:grant replication slave on *.* to ¡®Óû§Ãû¡¯@'Ö÷»ú¡¯ identified by ¡®ÃÜÂ롯; mysql>grant replicatio ......

OracleÓëMySQLÖС°¿É´®Ðл¯¡±µÄ¶Ô±È²âÊÔ

OracleÓëMySQLÖГ¿É´®Ðл¯”µÄ¶Ô±È²âÊÔ
      Thomas Kyte ÔÚ“Oracle 9i&10g±à³ÌÒÕÊõ”Ò»ÊéÖÐΪÁË˵Ã÷ÊÂÎñµÄ¸ôÀ뼶±ð£¬ÌṩÁËһЩÀý×Ó¡£ÕâÀïÎÒÃÇÀ´¿´¿´“¿É´®Ðл¯”¼¶±ðϵıíÏÖ¡£
ÒÔÆÕͨÓû§µÇ¼ϵͳ£¬²¢´´½¨²âÊÔÓÃµÄ±í¡£
idle> connect scott/tiger ......

mysql ×ÔÔöÁеĴ´½¨

1.½¨±íʱ¾Í´´½¨×ÔÔöÁУº
create table test
(
 id int auto_increment primary key,
 name varchar(20) not null,
 password varchar(20) not null
);
insert into test values(null,'aa','aa');
insert into test values(null,'bb','bb');
×¢Ò⣺
      ²åÈëÓï¾äʱ£¬×Ô ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ