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 ......
Á¬½ÓÊý¾Ý¿âʱÔõô³öÏÖÕâÑùµÄ´íÎó£º[localhost] ERROR 1045: Access denied for user 'root'@'localhost' (using password: YES) ÔΣ¬Óï¾äÌùÀ´¿´¿´ ÄãÃÜÂëÄØ ÃÜÂë´íÁË°É¡£ ¸Õѧmysql,ÕÕ×ÅÊ ......
ÎÒÏëÔÚmysqlÖн«t_flow_card_detail±íÖеÄclient_id×ֶθÄΪÍâ¼ü£¬ÒýÓÃt_client±íÖеÄclient_id×ֶΣº ÎÒµÄsqlÓï¾äÊÇ£º alter table t_flow_card_detail add constraint FK_flowcard_client foreig ......
´ó¼ÒºÃ£¬ÎÒÔÚ´´½¨Ë÷Òýʱ£¬³öÏÖ´íÎóÌáʾ£¬´úÂëÈçÏ£º create uique index stu_cou_index on student_info.results (student_id, course_id); show index from student_info.results; ±£´æΪindex ......
ÎÒ°²×°ºÃmysqlºó,ĬÈϵÄÊý¾Ý¿â·¾¶ÊÇÔÚCÅÌÏÂ,ÎÒÏë°ÑËü¸Äµ½EÅÌÀï: ÎÒÏÈ°Ñmysql·þÎñÍ£Ö¹,ÔÙÔÚmysql°²×°Ä¿Â¼(Ò²ÊÇÔÚEÅÌ)ÏÂÕÒµ½my.iniÎļþ,¾Í¸ÄÁËÏÂÃæÄÇô¶à: #Path to the database root datadir="E ......