当前位置:网站首页>Mysql: Invalid default value for TIMESTAMP
Mysql: Invalid default value for TIMESTAMP
2022-07-31 00:58:00 【Your Highness the Peach Blossom】
The timestamp must have a default value when creating a table

I searched a lot on the Internet, and what about set sql_model, the results are all restored after restarting the service
After doing a lot of work on the Internet, the most useful thing is to change the configuration in my.ini


After modifying sql_mode, then restart the service.
First sql query the default sql_mode, and then paste the value out
show variables like 'sql_mode';Change the NO_ZERO_DATE in the value to ALLOW_INVALID_DATES
Then paste into my.ini
Note here that sql_mode will be different depending on the version, mine is version 5.7
Also, the installation-free version of mysql does not use my.ini by default, but mydefault.ini. Copy the content of the defailt, create a my.ini file, paste it in, and restart the mysql service.
边栏推荐
- typescript16-void
- SereTOD2022 Track2 Code Analysis - Task-based Dialogue Systems Challenge for Semi-Supervised and Reinforcement Learning
- Artificial Intelligence and Cloud Security
- The level of ShardingSphere depots in actual combat (4)
- Jmeter parameter transfer method (token transfer, interface association, etc.)
- MySQL的触发器
- 剑指offer17---打印从1到最大的n位数
- 【Demo】ABAP Base64加解密测试
- 基于Keras_bert模型的Bert使用与字词预测
- MySQL database constraints, table design
猜你喜欢

系统设计.短链系统设计

Summary of MySQL database interview questions (2022 latest version)

网站频繁出现mysql等数据库连接失败等信息解决办法

ShardingSphere之读写分离(八)

华为“天才少年”稚晖君又出新作,从零开始造“客制化”智能键盘

Shell编程之条件语句

typescript13-类型别名

typescript12-联合类型

The level of ShardingSphere depots in actual combat (4)

Can deep learning solve the parameters of a specific function?
随机推荐
Filter (Filter)
typescript12 - union types
Detailed explanation of 9 common reasons for MySQL index failure
typescript13-类型别名
MySQL triggers
ShardingSphere之读写分离(八)
typescript9-常用基础类型
[C language course design] C language campus card management system
ShardingSphere之垂直分库分表实战(五)
系统设计.短链系统设计
《实战》基于电商领域的词性提取及其决策树模型建模
Rocky/GNU之Zabbix部署(1)
Preparations for web vulnerabilities
SWM32 Series Tutorial 6 - Systick and PWM
MySQL——数据库的查,增,删
金融政企被攻击为什么要用高防CDN?
ShardingSphere's unsharded table configuration combat (6)
Why use high-defense CDN when financial, government and enterprises are attacked?
查看zabbix-release-5.0-1.el8.noarch.rpm包内容
Thesis understanding: "Designing and training of a dual CNN for image denoising"