当前位置:网站首页>Invalid default value for 'create appears when importing SQL_ Time 'error reporting solution
Invalid default value for 'create appears when importing SQL_ Time 'error reporting solution
2022-07-06 10:45:00 【Programmer seven seven】
Scheme 1
reinstall MySQL database , Version selection 5.7 perhaps 5.7 Above version , This plan is a little rough , Friends who don't like rudeness can keep looking down .
Option two
The main reason for this mistake , The reason is that the default value of the time field column is CURRENT_TIMESTAMP The default value is , And this default is in the lower version of MySQL China does not support , So there is the wrong report in the title , So , Change the default value of each time field , such as :
DROP TABLE IF EXISTS `tb_config`;
CREATE TABLE `tb_config` (
`config_name` varchar(100) NOT NULL DEFAULT '' COMMENT ' Name of configuration item ',
`config_value` varchar(200) NOT NULL DEFAULT '' COMMENT ' The value of the configuration item ',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT ' Creation time ',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT ' Modification time ',
PRIMARY KEY (`config_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Change it to
DROP TABLE IF EXISTS `tb_config`;
CREATE TABLE `tb_config` (
`config_name` varchar(100) NOT NULL DEFAULT '' COMMENT ' Name of configuration item ',
`config_value` varchar(200) NOT NULL DEFAULT '' COMMENT ' The value of the configuration item ',
`create_time` datetime DEFAULT NULL COMMENT ' Creation time ',
`update_time` datetime DEFAULT NULL COMMENT ' Modification time ',
PRIMARY KEY (`config_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
边栏推荐
- Development of C language standard
- Time in TCP state_ The role of wait?
- npm一个错误 npm ERR code ENOENT npm ERR syscall open
- CSDN blog summary (I) -- a simple first edition implementation
- 该不会还有人不懂用C语言写扫雷游戏吧
- February 13, 2022 - Maximum subarray and
- Ueeditor internationalization configuration, supporting Chinese and English switching
- 高并发系统的限流方案研究,其实限流实现也不复杂
- Security design verification of API interface: ticket, signature, timestamp
- frp内网穿透那些事
猜你喜欢
CSDN博文摘要(一) —— 一个简单的初版实现
Export virtual machines from esxi 6.7 using OVF tool
Complete web login process through filter
CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework
Use JUnit unit test & transaction usage
Adaptive Bezier curve network for real-time end-to-end text recognition
windows下同时安装mysql5.5和mysql8.0
Mysql21 user and permission management
Just remember Balabala
CSDN问答模块标题推荐任务(二) —— 效果优化
随机推荐
高并发系统的限流方案研究,其实限流实现也不复杂
CSDN问答标签技能树(五) —— 云原生技能树
Nanny hand-in-hand teaches you to write Gobang in C language
windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止
MySQL27-索引優化與查詢優化
MySQL26-性能分析工具的使用
Mysql27 index optimization and query optimization
UEditor国际化配置,支持中英文切换
Mysql35 master slave replication
[paper reading notes] - cryptographic analysis of short RSA secret exponents
Valentine's Day is coming, are you still worried about eating dog food? Teach you to make a confession wall hand in hand. Express your love to the person you want
[BMZCTF-pwn] 11-pwn111111
MySQL18-MySQL8其它新特性
@controller,@service,@repository,@component区别
How to change php INI file supports PDO abstraction layer
frp内网穿透那些事
Global and Chinese markets for aprotic solvents 2022-2028: Research Report on technology, participants, trends, market size and share
Postman environment variable settings
Database middleware_ MYCAT summary
Discriminant model: a discriminant model creation framework log linear model