---
slug: "MySQL5.6で、ERROR1265(01000):Datatruncatedforcolumn...が出てSQLが実行されない"
title: "MySQL 5.6: ERROR 1265 (01000): Data truncated for column ... prevents SQL execution"
description: "\n\nIsn't sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES specified in your my.cnf?"
url: "https://www.ytyng.com/en/blog/MySQL5.6で、ERROR1265(01000):Datatruncatedforcolumn...が出てSQLが実行されない"
publish_date: "2013-09-18T06:23:04Z"
created: "2013-09-18T06:23:04Z"
updated: "2026-02-27T10:45:03.229Z"
categories: ["PC/Etc"]
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20230812/0b0be27e88b5464cbad9f0cf9a0205c3.png.webp?width=768"
has_video: false
has_music: false
video_urls: []
music_urls: []
lang: "en"
---

# MySQL 5.6: ERROR 1265 (01000): Data truncated for column ... prevents SQL execution

<div class="document">

<p>Isn't <code>sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES</code> specified in your <code>my.cnf</code>?</p>
<p>If you execute SQL statements that did not cause any issues in the previous system under MySQL 5.6's default settings (STRICT_TRANS_TABLES), you might encounter errors such as:</p>
<pre class="literal-block">ERROR 1265 (01000): Data truncated for ...
</pre>
<p>For example, trying to INSERT NULL into a NOT NULL field.</p>
<p>You can either modify the SQL or change your <code>my.cnf</code> as follows:</p>
<pre class="literal-block">sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
↓
sql_mode=NO_ENGINE_SUBSTITUTION
</pre>
<p>This should resolve the issue.</p>
<p>Reference:</p>
<p>Errors started occurring with some SQL after upgrading to MySQL 5.6 | Seeds Creators Blog
<a class="reference external" href="http://www.seeds-std.co.jp/seedsblog/1035.html">http://www.seeds-std.co.jp/seedsblog/1035.html</a></p>
</div>
