当前位置:网站首页>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;
边栏推荐
- 使用OVF Tool工具从Esxi 6.7中导出虚拟机
- 高并发系统的限流方案研究,其实限流实现也不复杂
- 百度百科数据爬取及内容分类识别
- February 13, 2022-2-climbing stairs
- MySQL27-索引優化與查詢優化
- MySQL34-其他数据库日志
- Timestamp with implicit default value is deprecated error in MySQL 5.6
- Emotional classification of 1.6 million comments on LSTM based on pytoch
- CSDN博文摘要(一) —— 一个简单的初版实现
- CSDN question and answer module Title Recommendation task (I) -- Construction of basic framework
猜你喜欢
MySQL33-多版本并发控制
API learning of OpenGL (2002) smooth flat of glsl
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
Record the first JDBC
Mysql23 storage engine
MySQL28-数据库的设计规范
基于Pytorch肺部感染识别案例(采用ResNet网络结构)
Pytorch LSTM实现流程(可视化版本)
Nanny hand-in-hand teaches you to write Gobang in C language
MySQL36-数据库备份与恢复
随机推荐
MySQL完全卸载(Windows、Mac、Linux)
@controller,@service,@repository,@component区别
Mysql36 database backup and recovery
Ueeditor internationalization configuration, supporting Chinese and English switching
MySQL 29 other database tuning strategies
Opencv uses freetype to display Chinese
A brief introduction to the microservice technology stack, the introduction and use of Eureka and ribbon
Time complexity (see which sentence is executed the most times)
MySQL transaction log
MySQL20-MySQL的数据目录
How to change php INI file supports PDO abstraction layer
[leectode 2022.2.13] maximum number of "balloons"
Global and Chinese market of thermal mixers 2022-2028: Research Report on technology, participants, trends, market size and share
使用OVF Tool工具从Esxi 6.7中导出虚拟机
MySQL24-索引的数据结构
MySQL18-MySQL8其它新特性
MySQL25-索引的创建与设计原则
MySQL30-事务基础知识
该不会还有人不懂用C语言写扫雷游戏吧
[C language foundation] 04 judgment and circulation