当前位置:网站首页>如何解决数据库插入数据显示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重启无需命令。
好了,完美解决
边栏推荐
- How to set up in touch designer 2022 to solve the problem that leap motion is not recognized?
- win系统下安装redis以及windows扩展方法
- Ideas of high concurrency and high traffic seckill scheme
- Party A's requirements for those who have lost 800 yuan
- New Year Fireworks code plus copy, are you sure you don't want to have a look
- 693. 行程排序
- Qt多线程的多种方法之一 QThread
- 【GNN】图解GNN: A gentle introduction(含视频)
- 高并发大流量秒杀方案思路
- [FPGA tutorial case 14] design and implementation of FIR filter based on vivado core
猜你喜欢
你不知道的互联网公司招聘黑话大全
[SOC FPGA] custom IP PWM breathing lamp
Rk3399 platform development series explanation (WiFi) 5.52. Introduction to WiFi framework composition
@pathvariable 和 @Requestparam的详细区别
Experience sharing of contribution of "management world"
FlexRay通信协议概述
软件测试知识储备:关于「登录安全」的基础知识,你了解多少?
Test the foundation of development, and teach you to prepare for a fully functional web platform environment
[SQL practice] a SQL statistics of epidemic distribution across the country
2022Android面试必备知识点,一文全面总结
随机推荐
VMware安装后打开就蓝屏
深度聚类:将深度表示学习和聚类联合优化
2022Android面试必备知识点,一文全面总结
JMeter's own functions are not enough? Why don't you develop one yourself
JVM monitoring and diagnostic tools - command line
Ctfshow-- common posture
JVM命令之 jstat:查看JVM統計信息
Test the foundation of development, and teach you to prepare for a fully functional web platform environment
进程间通信之共享内存
JMeter function assistant - random value, random string, fixed value random extraction
[FPGA tutorial case 14] design and implementation of FIR filter based on vivado core
c面试 加密程序:由键盘输入明文,通过加密程序转换成密文并输出到屏幕上。
Software testing knowledge reserve: how much do you know about the basic knowledge of "login security"?
SubGHz, LoRaWAN, NB-IoT, 物联网
QT console output in GUI applications- Console output in a Qt GUI app?
You don't know the complete collection of recruitment slang of Internet companies
Rk3399 platform development series explanation (WiFi) 5.53, hostapd (WiFi AP mode) configuration file description
Database notes 04
rt-thread 中对 hardfault 的处理
VScode进行代码补全