mysql>set global max_allowed_packet=1024*1024*1024;
查一下变了没,之间是4开头的,现在多了好多位。忘记截图了。
mysql> show global variables like 'max_allowed_packet';
这样就可以顺利导入,不报错。我是报了错才找到解决方法,对了,我的数据库是解压版,不是安装版。
如果不小心导入了,出错了,那么就是删除数据库,那真的是多,有什么办法呢?有呀,只要百度就有。
直接上删库语句更好
drop database admin_0; drop database admin_1; drop database admin_2; drop database admin_3; drop database admin_3; drop database app_behavior_0; drop database app_behavior_1; drop database app_behavior_2; drop database app_behavior_3; drop database app_behavior_4; drop database app_behavior_5; drop database app_behavior_6; drop database app_behavior_7; drop database app_behavior_8; drop database app_behavior_9; drop database app_behavior_10; drop database app_behavior_11; drop database app_behavior_12; drop database app_behavior_13; drop database app_behavior_14; drop database app_behavior_15; drop database app_behavior_16; drop database app_behavior_17; drop database app_behavior_18; drop database app_behavior_19; drop database app_behavior_20; drop database app_behavior_21; drop database app_behavior_22; drop database app_behavior_23; drop database app_behavior_24; drop database app_behavior_25; drop database app_behavior_26; drop database app_behavior_27; drop database app_behavior_28; drop database app_behavior_29; drop database app_behavior_30; drop database app_behavior_31; drop database app_behavior_32; drop database app_behavior_33; drop database app_behavior_34; drop database app_behavior_35; drop database app_behavior_36; drop database app_behavior_37; drop database app_behavior_38; drop database app_behavior_39; drop database app_behavior_40; drop database app_behavior_41; drop database app_behavior_42; drop database app_behavior_43; drop database app_behavior_44; drop database app_behavior_45; drop database app_behavior_46; drop database app_behavior_47; drop database app_behavior_48; drop database app_behavior_49; drop database app_info_0; drop database app_info_1; drop database app_info_2; drop database app_info_3; drop database app_info_4; drop database app_info_5; drop database app_info_6; drop database app_info_7; drop database app_info_8; drop database app_info_9; drop database app_info_10; drop database app_info_11; drop database app_info_12; drop database app_info_13; drop database app_info_14; drop database app_info_15; drop database app_info_16; drop database app_info_17; drop database app_info_18; drop database app_info_19; drop database app_info_20; drop database app_info_21; drop database app_info_22; drop database app_info_23; drop database app_info_24; drop database app_info_25; drop database app_info_26; drop database app_info_27; drop database app_info_28; drop database app_info_29; drop database app_info_30; drop database app_info_31; drop database app_info_32; drop database app_info_33; drop database app_info_34; drop database app_info_35; drop database app_info_36; drop database app_info_37; drop database app_info_38; drop database app_info_39;
drop database app_seq;
drop database crawlers_0; drop database crawlers_1; drop database crawlers_2; drop database crawlers_3; drop database crawlers_4; drop database crawlers_5;
drop database wemedia_0; drop database wemedia_1; drop database wemedia_2; drop database wemedia_3; drop database wemedia_4; drop database wemedia_5;