当前位置:网站首页>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;
边栏推荐
- MNIST implementation using pytoch in jupyter notebook
- Pytorch RNN actual combat case_ MNIST handwriting font recognition
- Database middleware_ MYCAT summary
- Mysql21 - gestion des utilisateurs et des droits
- CSDN-NLP:基于技能树和弱监督学习的博文难度等级分类 (一)
- Ueeditor internationalization configuration, supporting Chinese and English switching
- MySQL23-存储引擎
- 百度百科数据爬取及内容分类识别
- Global and Chinese market for intravenous catheter sets and accessories 2022-2028: Research Report on technology, participants, trends, market size and share
- IDEA 导入导出 settings 设置文件
猜你喜欢

windows无法启动MYSQL服务(位于本地计算机)错误1067进程意外终止

How to change php INI file supports PDO abstraction layer

MySQL32-锁

IDEA 导入导出 settings 设置文件

CSDN question and answer tag skill tree (I) -- Construction of basic framework

Other new features of mysql18-mysql8

数据库中间件_Mycat总结

Moteur de stockage mysql23

windows下同时安装mysql5.5和mysql8.0

Typescript入门教程(B站黑马程序员)
随机推荐
API learning of OpenGL (2005) gl_ MAX_ TEXTURE_ UNITS GL_ MAX_ TEXTURE_ IMAGE_ UNITS_ ARB
Mysql34 other database logs
MySQL25-索引的创建与设计原则
解决:log4j:WARN Please initialize the log4j system properly.
Mysql21 user and permission management
Emotional classification of 1.6 million comments on LSTM based on pytoch
text 文本数据增强方法 data argumentation
Adaptive Bezier curve network for real-time end-to-end text recognition
Water and rain condition monitoring reservoir water and rain condition online monitoring
虚拟机Ping通主机,主机Ping不通虚拟机
MySQL21-用户与权限管理
Use JUnit unit test & transaction usage
MySQL35-主从复制
Isn't there anyone who doesn't know how to write mine sweeping games in C language
CSDN question and answer module Title Recommendation task (II) -- effect optimization
用于实时端到端文本识别的自适应Bezier曲线网络
Kubernetes - problems and Solutions
Introduction tutorial of typescript (dark horse programmer of station B)
MySQL27-索引优化与查询优化
Google login prompt error code 12501