Mysql数据的常见错误

错误:(补充:mysql启动service mysql start  停止service mysql stop  状态service mysql status

1:[Err] 1118 - The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size.

[Err] insert into oec_sclassify_model ( .......

    2:[Err] 2006 - MySQL server has gone away
[Err] insert into oec_sclassify_model ( MODEL_CONTENT,CLAS_ID,VALID_FLG,CORRECT_RATE,CORPUS_TOTAL,CREATE_TIME,CREATE_EMP_CODE)values( 'svm_type c_svc
kernel_type linear

解决方案:在mysql的/etc/my.ini(如果没有可以将mysql的.ini文件复制到/etc下面),文件中加上参数:

innodb_log_file_size=640M

max_allowed_packet = 64M

原因数据库表中某些字段太大,如longtext类型的数据,数据库缓冲区过小导致的。详情参考:

http://www.th7.cn/db/mysql/201512/173009.shtml


2:设置数据库不区分大小写

在/etc/my.ini中添加参数:

lower_case_table_names=1

你可能感兴趣的:(Mysql数据的常见错误)