当前位置:网站首页>如何解决数据库插入数据显示SQLSTATE[HY000]: General error: 1364 Field ‘xxxxx‘ doesn‘t have a default value错误
如何解决数据库插入数据显示SQLSTATE[HY000]: General error: 1364 Field ‘xxxxx‘ doesn‘t have a default value错误
2022-07-07 01:44:00 【刘杨造梦程序开发建站】
mysql数据库设置有问题
最终找到办法,就是mysql设置的问题,有my.ini的就找这个文件,没有的就找my.cnf(这个一般都在/ect/my.conf),找到这个文件就去找[mysqld]这个配置,然后找
sql-mode="STRICT_TRANS_TABLESNO_ENGINE_SUBSTITUTION"
这个可能你我的不相同,你只要找到sql-mode 就好,然后将这个复制一次(习惯性的安全),注释上,将它改成sql-mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION(如果没有找到就直接添加),宝塔面板的直接在mysql配置修改里直接操作修改。
然后在重启数据库。
service mysqld restart
宝塔面板直接mysql重启无需命令。
好了,完美解决
边栏推荐
- Party A's requirements for those who have lost 800 yuan
- Cloud acceleration helps you effectively solve attack problems!
- A freshman's summary of an ordinary student [I don't know whether we are stupid or crazy, but I know to run forward all the way]
- The solution of a simple algebraic problem
- Change the original style of UI components
- laravel 使用腾讯云 COS5全教程
- Markdown 并排显示图片
- Niuke Xiaobai monthly race 52 E. sum logarithms in groups (two points & inclusion and exclusion)
- K8s running Oracle
- Financial risk control practice - decision tree rule mining template
猜你喜欢

You don't know the complete collection of recruitment slang of Internet companies

Convert numbers to string strings (to_string()) convert strings to int sharp tools stoi();

力扣62 不同路径(从矩阵左上到右下的所有路径数量) (动态规划)

POI excel export, one of my template methods

Sequential storage of stacks

Ctfshow-- common posture
![Cf:c. column swapping [sort + simulate]](/img/0e/64d17980d3ec0051cdfb5fdb34e119.png)
Cf:c. column swapping [sort + simulate]

JVM命令之 jstat:查看JVM统计信息

Subghz, lorawan, Nb IOT, Internet of things

PostgreSQL database timescaledb function time_ bucket_ Gapfill() error resolution and license replacement
随机推荐
DC-7靶机
Talking about reading excel with POI
当我们谈论不可变基础设施时,我们在谈论什么
C语言面试 写一个函数查找两个字符串中的第一个公共字符串
Experience of Niuke SQL
360 Zhiyu released 7.0 new products to create an exclusive "unified digital workspace" for the party, government and army, and central and state-owned enterprises
ML's shap: Based on the adult census income binary prediction data set (whether the predicted annual income exceeds 50K), use the shap decision diagram combined with the lightgbm model to realize the
CMD permanently delete specified folders and files
Dc-7 target
Go language learning notes - Gorm use - native SQL, named parameters, rows, tosql | web framework gin (IX)
JMeter's own functions are not enough? Why don't you develop one yourself
VMware安装后打开就蓝屏
云加速,帮助您有效解决攻击问题!
JMeter function assistant - random value, random string, fixed value random extraction
Ctfshow-- common posture
改变ui组件原有样式
360织语发布7.0新品 为党政军、央国企打造专属“统一数字工作空间”
C面试24. (指针)定义一个含有20个元素的double型数组a
骑士战胜魔王(背包&dp)
If you don't know these four caching modes, dare you say you understand caching?