错误提示:General error: 1366 Incorrect integer value: '' for column 'pay_type' at row 1 (SQL:

INSERT INTO `issues` (`player_game_id`, `urgency_degree`, `source`, `channel_forum`, `issue_type`, `pay_type`, `status`, `issue_pic`, `updated_at`, `created_at`)
VALUES (3006, 1, 0, '', 3003, '', 2, '', '2015-11-18 14:08:27', '2015-11-18 14:08:27')

)

字段source, pay_type的默认值都是0

这个问题在我本机会出现而在线上环境并不会出现

后来发现是因为两者的配置文件不一样,本地的my.cnf文件的sql-mode的值多了一个STRICT_TRANS_TABLES,会比较严格,不允许向默认值指定为数字的字段插入空值,而线上的my.cnf的配置会使插入的空值自动转换成0

MySQL 错误 1366:1366 Incorrect integer value的更多相关文章

  1. mysql 插入中文时出现ERROR 1366 (HY000): Incorrect string value: '\xC0\xEE\xCB\xC4' for column 'usern ame' at row 1

    1 环境: MySQL Server 6.0  命令行工具 2 问题 :  插入中文字符数据出现如下错误: ERROR 1366 (HY000): Incorrect string value: '\ ...

  2. mysql insert中文乱码无法插入ERROR 1366 (HY000): Incorrect string value

    ERROR 1366 (HY000): Incorrect string value: '\xB1\xEA\xCC\xE2\xD5\xE2...' for column 'title' at row ...

  3. Linux MySQl 5.7.17 MySQL ERROR 1366(HY000):Incorrect string value 解决方法

    MySQL ERROR 1366(HY000):Incorrect string value,在往数据库中插入中文的时候会出现. 这也就是编码问题,网上大部分都是说设置下配置文件中的设置,而可悲的是在 ...

  4. Mysql插入中文时提示:ERROR 1366 (HY000): Incorrect string value: '\xE5\x8F\xB0\xE5\xBC\x8F...' fo

    Mysql插入数据时提示:ERROR 1366 (HY000): Incorrect string value: ‘\xE5\x8F\xB0\xE5\xBC\x8F…’ fo 分析如下: 首先通过语句 ...

  5. MySQL ERROR 1366(HY000) Incorrect string value

    有以下两张表: mysql> show tables; +---------------+ | Tables_in_old | +---------------+ | book | | pres ...

  6. mysql General error: 1366 Incorrect string value: '\xF0\x9F\x91\x8D\xF0\x9F...' for column 'dianpumiaoshu' at row 1 解决方法

    mysql General error: 1366 Incorrect string value: '\xF0\x9F\x91\x8D\xF0\x9F...' for column 'dianpumi ...

  7. ERROR 1366 (HY000): Incorrect string value: '\xE9\x83\x91\xE5\xB7\x9E' for column 'aa' at row 1 MySQL 字符集

    ERROR 1366 (HY000): Incorrect string value: '\xE9\x83\x91\xE5\xB7\x9E' for column 'aa' at row 1创建表之后 ...

  8. ERROR 1366 (HY000): Incorrect string value:MySQL数据库、表的字符集为GBK

    mysql> update userinfo set MEDIASOURCE = 'CS02-北京' where IMPORTNO = 'IMP201640613101206';ERROR 13 ...

  9. mysql DOS中中文乱码 ERROR 1366 (HY000): Incorrect string value: '\xC4\xEA\xBC\xB6' for column 'xxx' at row 1

    问题:ERROR (HY000): Incorrect string value: 在DOS中插入或查询中文出现乱码 登入mysql,输入命令:show variables like '%char%' ...

随机推荐

  1. CentOS 7安装Ansible

    在CentOS下安装Ansible非常的简单,但需要注意一下几点: 1.为了简单建议使用yum的epel源安装,毕竟没什么模块需要自己定制的,如果非要指定版本,可以指定不同的版本,下面会讲. 2.母机 ...

  2. delphi Tdxribbon 设置背景和skin 皮肤

    https://blog.csdn.net/maxwoods/article/details/8592389 http://www.cnblogs.com/baoluo/archive/2011/04 ...

  3. MyEclipse 2016 破解详细过程

    转自:https://blog.csdn.net/u012318074/article/details/71310553/ 文件资源 MyEclipse 和 破解程序可以到百度云下载:http://p ...

  4. yum install --downloadonly 下载依赖包到本地 但不安装

    如果手动去一个个找依赖是很困难的,即便已经知道名字.版本,下面就依赖系统自带的命令完成该步骤 以java为例,其他安装包只要替换包名 yum install --downloadonly --down ...

  5. 如何在Angular优雅编写HTTP请求

    原文:https://segmentfault.com/a/1190000010570799 ----------------------------------------------------- ...

  6. 转: 调整 Linux I/O 调度器优化系统性能

    转自:https://www.ibm.com/developerworks/cn/linux/l-lo-io-scheduler-optimize-performance/index.html 调整 ...

  7. RPC简述

    在某种意义上,WebService.REST均是RPC的实现,那么RPC的发展过程如何呢?本文参考了wikipedia,对RPC做一下简要摘记. RPC(RemoteProcedureCall),是进 ...

  8. DbContext SQLite配置文件

    <?xml version="1.0" encoding="utf-8"?> <configuration> <configSec ...

  9. Oracle 12c中文乱码,修改字符集的方法

    在windows 7 64位上安装Oracle 12c没有设定字符集,采用的是操作系统默认字符集:WE8MSWIN1252,将字符集修改为:ZHS16GBK.由于过程不可逆,首先需要备份数据库. 1. ...

  10. Spark 论文篇-大型集群上的快速和通用数据处理架构(中英双语)

    论文内容: 待整理 参考文献: An Architecture for Fast and General Data Processing on Large Clusters. Matei Zahari ...