

MySQL Error "Incorrect integer value" for column 'name' at row 1″解决...
source link: https://idealclover.top/archives/319/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

MySQL Error "Incorrect integer value" for column 'name' at row 1″解决方法
2017.11.06 | 零零碎碎 | 1977 浏览 | 0 赞 | 0 条评论
请注意,本文编写于 1478 天前,最后修改于 932 天前,其中某些信息可能已经过时。
在使用 typecho 的插件时遇到了数据库的错误,通过日志回溯之后发现错误原因是 MySQL Error "Incorrect integer value" for column '' at row 1,仔细查了一下。
主要的坑在于 sql_mode 的值,MySQL 5.5 中 sql_mode 默认值为 '', MySQL 5.6 (貌似是为了增加安全性),将 sql 默认值定为 NO_ENGINE_SUBSTITUTION,于是原来的程序 sql 语法不严谨就会出现报错。
处理的方法有两种:
一种是使用 SET 命令,在 MySQL 的命令行中输入
mysql> SET GLOBAL sql_mode = '';
坏处似乎是每次重新启动都需要重新设置。
另一种是修改 my.cnf 文件,在 my.cnf 配置文件中添加
sql_mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
保存文件,重启 MySQL 服务。
https://dev.mysql.com/doc/refman/5.5/en/sql-mode.html
https://dev.mysql.com/doc/refman/5.6/en/sql-mode.html
https://www.devside.net/wamp-server/mysql-error-incorrect-integer-value-for-column-name-at-row-1
http://linux.it.net.cn/m/view.php?aid=21124
本文链接:https://idealclover.top/archives/319/
本作品由 idealclover 采用 知识共享署名 - 非商业性使用 - 相同方式共享 4.0 国际许可协议 进行许可,转载请注明出处。
Recommend
-
31
Sometimes, you may experience “ERROR 1034: Incorrect key file” while running the ALTER TABLE or CREATE INDEX command: mysql> alter table ontime add key(FlightDate); ERROR 1034 (HY000): Incorrect key file for t...
-
8
Round float to integer value yourbasic.org/golang Round away from zeroGo 1.10 Use math.Round to retur...
-
6
Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful Saturday, February 28, 2009 I am doing some work on writing
-
6
New issue Improve error message for incorrect field accesses through raw pointers #91364
-
13
How to use trigger in mysql to update a column value from a given date to date only for a unique client identifier advertisements ...
-
7
Nic Lin's Blog喜歡在地上滾的工程師在 mysql 裡面要注意 character 的設定,否則會發生儲存錯誤的情況發生,今天在本機開發時一切正常,上 production 跑完 migrate 後新增資料...
-
4
[JavaScript] Check if Value of Input Text Field is Integer April 23, 2018...
-
9
Check if Value of HTML Input Text Field is Integer in Go April 25, 2018...
-
7
Mio Yasutake 2 days ago CAP deploy error: class java.lang.Integer cannot be cast to class java.lang.String 117 Vie...
-
10
Rails preserves entry TTL when incrementing or decrementing an integer value. Feb 7, 2023 , by Murtaza Bagwala 1 minute read...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK