MySQLÊý¾Ý°ü¹ý´ó
ÎÒÓÃÒ»¸öÑ»·ÍùÊý¾Ý¿âÀïÃæ´æÎļþ£¬±¾À´¿ÉÒÔ×÷ΪÎļþ´æ·ÅÊý¾Ý¿âÀïÃæÖ»·ÅÎļþµÄλÖõģ¬µ«ÊÇûÓа취×âµÄ·þÎñÆ÷ÍøÒ³¿Õ¼ä´óСÓÐÏÞÖÆÊý¾Ý¿âûÓÐÏÞÖÆ¡£Óï¾äÊÇÕâÑùµÄ public static final DataBase.MAXSIZE=1024*512; for(int i=0;i <size;i+=DataBase.MAXSIZE){ System.out.println(i); PreparedStatement sql=con.prepareStatement("insert into FILE_DATA_TABLE(DATA_SIZE,DATA_CON,FILE_ID)values(?,0,?);"); if((size-i)>DataBase.MAXSIZE){ sql.setInt(1, DataBase.MAXSIZE); sql.setBinaryStream(2, in, DataBase.MAXSIZE); }else{ sql.setInt(1,in.available()-i); sql.setBinaryStream(2, in,in.available()-i); break; } sql.setInt(2, this.fILE_ID); sql.execute(); sql=null; } µ«ÊÇ×Ü»áÅ׳ö Packet for query is too large (6921195 > 1048576). You can change this value on the server by setting the max_allowed_packet' variable. ¸÷λÓÐûÓнâ¾ö°ì·¨£¿
ÒýÓà mysqlÊý¾Ý¿âÉèÖÃÁËÏÞÖÆ, max_allowed_packet = 1048576 ËùÒÔ£¬±ØÐëÐÞ¸ÄmysqlÉèÖ㺠[mysqld] max_allowed_packet=16M Õâ¸öûÓа취¸Ä°¡£¬ËûÃǵķþÎñÆ÷²»Èøģ¬ÎÒʵÔÚºÜÓôÃÆ ¶¥Ò»¸ö£¬²»Ì«Á˽â
Ïà¹ØÎÊ´ð£º
mySql5.1µÄ mysql command line clientÃüÁî´°¿Úÿ´ÎÒ»µãËü,Ëü¾ÍÒ»ÉÁ¶ø¹ý,²»»áÏÔʾÁË.ÕâÊÇʲôÎÊÌâ? ÔÚÄãµÄWINDOWSÉÏ£¬ÏÈ°´ [¿ªÊ¼], È»ºó [ÔËÐÐ] ,ÊäÈë cmd È»ºó»Ø³µ È»ºóÔÙÔÚÕâ¸öDOS´°ÌåÖУ¬ cd C:\Program ......
ÎÒ½¨ÁËÁ½¸ö±í£¬Ò»¸ö±íÃ÷user£¬Ò»¸ö±íanswer ±íuserµÄ½á¹¹{id,username,password} ±íanswerµÄ½á¹¹{A_id,question,answer,U_id} Çë½Ì´ó¼ÒÎÒÔõôÉèÖòÅÄÜÔÚ±íuser²åÈëÊý¾Ýʱ£¬±íanswer¶ÔÓ¦µÄU_id×Ô¶¯¸üжÔÓ¦± ......
ÏÖÔÚÓÐÒ»¸öÍøÕ¾£¬ÏëÔÚÁíÍâһ̨·þÎñÆ÷ÉÏ×öÒ»¸öÕâ¸öÍøÕ¾µÄ¾µÏñ¡£ ÔÚÖ÷ÍøÕ¾ÉϵÄÊý¾Ý¸üÐÂҪͬ²½µ½¾µÏñ·þÎñÆ÷ÉÏ Í¬Ê±Óû§·ÃÎʾµÏñ·þÎñÆ÷ʱµÄÊý¾Ý¸üÐÂҲҪͬ²½µ½Ö÷ÍøÕ¾ÉÏ ÆäÖÐÊý¾Ý¸üРÖ÷Òª°üÀ¨ MysqlÊý¾Ý¿âµ ......
ÎÒ°²×°ºÃmysqlºó,ĬÈϵÄÊý¾Ý¿â·¾¶ÊÇÔÚCÅÌÏÂ,ÎÒÏë°ÑËü¸Äµ½EÅÌÀï: ÎÒÏÈ°Ñmysql·þÎñÍ£Ö¹,ÔÙÔÚmysql°²×°Ä¿Â¼(Ò²ÊÇÔÚEÅÌ)ÏÂÕÒµ½my.iniÎļþ,¾Í¸ÄÁËÏÂÃæÄÇô¶à: #Path to the database root datadir="E ......
ÔÚmysqlÖÐrepair table xxxxx;Ìáʾ mysql> repair table recordTbl; +-----------------+--------+----------+----------------------------------------------+ | Table   ......