当前位置:网站首页>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;
边栏推荐
- Pytorch RNN actual combat case_ MNIST handwriting font recognition
- API learning of OpenGL (2003) gl_ TEXTURE_ WRAP_ S GL_ TEXTURE_ WRAP_ T
- CSDN question and answer tag skill tree (II) -- effect optimization
- CSDN question and answer tag skill tree (I) -- Construction of basic framework
- Use of dataset of pytorch
- CSDN question and answer module Title Recommendation task (II) -- effect optimization
- How to find the number of daffodils with simple and rough methods in C language
- Mysql27 - Optimisation des index et des requêtes
- Mysql32 lock
- Moteur de stockage mysql23
猜你喜欢
Ueeditor internationalization configuration, supporting Chinese and English switching
Database middleware_ MYCAT summary
Mysql25 index creation and design principles
Mysql32 lock
Postman Interface Association
Mysql21 user and permission management
MySQL23-存储引擎
Mysql27 - Optimisation des index et des requêtes
Opencv uses freetype to display Chinese
基于Pytorch肺部感染识别案例(采用ResNet网络结构)
随机推荐
[untitled]
MySQL23-存储引擎
Have you mastered the correct posture of golden three silver four job hopping?
Timestamp with implicit default value is deprecated error in MySQL 5.6
Download and installation of QT Creator
Kubernetes - problems and Solutions
PyTorch RNN 实战案例_MNIST手写字体识别
Pytorch LSTM实现流程(可视化版本)
CSDN问答标签技能树(一) —— 基本框架的构建
How to change php INI file supports PDO abstraction layer
Mysql21 user and permission management
Win10: how to modify the priority of dual network cards?
Mysql27 index optimization and query optimization
MySQL20-MySQL的数据目录
MySQL21-用户与权限管理
Global and Chinese markets of static transfer switches (STS) 2022-2028: Research Report on technology, participants, trends, market size and share
API learning of OpenGL (2001) gltexgen
[unity] simulate jelly effect (with collision) -- tutorial on using jellysprites plug-in
frp内网穿透那些事
[BMZCTF-pwn] 12-csaw-ctf-2016-quals hungman