当前位置:网站首页>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.
边栏推荐
- Shell programming of conditional statements
- Rocky/GNU之Zabbix部署(3)
- WMware Tools installation failed segmentation fault solution
- unity2D横版游戏教程4-物品收集以及物理材质
- The level of ShardingSphere depots in actual combat (4)
- 【愚公系列】2022年07月 Go教学课程 013-常量、指针
- This project is so geeky
- 小程序-全局数据共享
- 小黑leetcode之旅:104. 二叉树的最大深度
- Mysql systemized JOIN operation example analysis
猜你喜欢
随机推荐
Responsive layout vs px/em/rem
ShardingSphere之未分片表配置实战(六)
孩子的编程启蒙好伙伴,自己动手打造小世界,长毛象教育AI百变编程积木套件上手
[Yugong Series] July 2022 Go Teaching Course 016-Logical Operators and Other Operators of Operators
SereTOD2022 Track2代码剖析-面向半监督和强化学习的任务型对话系统挑战赛
typescript17 - function optional parameters
xss bypass: prompt(1)
GO GOPROXY proxy Settings
typescript9-常用基础类型
【Multithreading】
ShardingSphere之读写分离(八)
The client series of the DOM series
Typescript18 - object type
MySQL notes under
tensorflow与GPU版本对应安装问题
35. 反转链表
Jetpack Compose learning (8) - State and remeber
[C language course design] C language campus card management system
【Demo】ABAP Base64加解密测试
什么是Promise?Promise的原理是什么?Promise怎么用?