当前位置:网站首页>如何解决数据库插入数据显示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重启无需命令。
好了,完美解决
边栏推荐
- C语言整理(待更新)
- Developers don't miss it! Oar hacker marathon phase III chain oar track registration opens
- 牛客小白月赛52 E.分组求对数和(二分&容斥)
- Rk3399 platform development series explanation (interruption) 13.10, workqueue work queue
- Redisl garbled code and expiration time configuration
- [Shell]常用shell命令及测试判断语句总结
- Qtthread, one of many methods of QT multithreading
- Chain storage of stack
- 软件测试知识储备:关于「登录安全」的基础知识,你了解多少?
- JVM监控及诊断工具-命令行篇
猜你喜欢

深度聚类:将深度表示学习和聚类联合优化

ETCD数据库源码分析——从raftNode的start函数说起

Dc-7 target

Audio distortion analysis of DSP and DAC based on adau1452

JVM命令之 jinfo:实时查看和修改JVM配置参数

软件测试的几个关键步骤,你需要知道

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

你不知道的互联网公司招聘黑话大全

Jstack of JVM command: print thread snapshots in JVM

3428. Put apples
随机推荐
Database notes 04
The solution of a simple algebraic problem
[FPGA] EEPROM based on I2C
基本Dos命令
VMware安装后打开就蓝屏
Jstat pour la commande JVM: voir les statistiques JVM
c语言(结构体)定义一个User结构体,含以下字段:
Understand the deserialization principle of fastjson for generics
解决pod install报错:ffi is an incompatible architecture
Ideas of high concurrency and high traffic seckill scheme
Dc-7 target
JVM命令之 jinfo:实时查看和修改JVM配置参数
Oracle迁移中关于大容量表使用数据泵(expdp、impdp)导出导入容易出现的问题和注意事项
[FPGA tutorial case 13] design and implementation of CIC filter based on vivado core
JVM monitoring and diagnostic tools - command line
VScode进行代码补全
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
测试开发基础,教你做一个完整功能的Web平台之环境准备
If you don't know these four caching modes, dare you say you understand caching?
Introduction to the extension implementation of SAP Spartacus checkout process