当前位置:网站首页>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;
边栏推荐
- Solution to the problem of cross domain inaccessibility of Chrome browser
- MySQL完全卸载(Windows、Mac、Linux)
- 35 is not a stumbling block in the career of programmers
- CSDN问答标签技能树(五) —— 云原生技能树
- How to find the number of daffodils with simple and rough methods in C language
- What is the difference between TCP and UDP?
- Windchill configure remote Oracle database connection
- MySQL 20 MySQL data directory
- MySQL27-索引優化與查詢優化
- [reading notes] rewards efficient and privacy preserving federated deep learning
猜你喜欢
Win10: how to modify the priority of dual network cards?
[C language] deeply analyze the underlying principle of data storage
ByteTrack: Multi-Object Tracking by Associating Every Detection Box 论文阅读笔记()
MySQL35-主从复制
Nanny hand-in-hand teaches you to write Gobang in C language
该不会还有人不懂用C语言写扫雷游戏吧
Water and rain condition monitoring reservoir water and rain condition online monitoring
Mysql23 storage engine
IDEA 导入导出 settings 设置文件
Postman environment variable settings
随机推荐
Mysql21 - gestion des utilisateurs et des droits
CSDN Q & a tag skill tree (V) -- cloud native skill tree
[paper reading notes] - cryptographic analysis of short RSA secret exponents
MySQL18-MySQL8其它新特性
pytorch的Dataset的使用
Download and installation of QT Creator
[C language foundation] 04 judgment and circulation
MySQL 20 MySQL data directory
Adaptive Bezier curve network for real-time end-to-end text recognition
Export virtual machines from esxi 6.7 using OVF tool
基于Pytorch的LSTM实战160万条评论情感分类
CSDN blog summary (I) -- a simple first edition implementation
MySQL26-性能分析工具的使用
Transactions have four characteristics?
Csdn-nlp: difficulty level classification of blog posts based on skill tree and weak supervised learning (I)
UEditor国际化配置,支持中英文切换
Isn't there anyone who doesn't know how to write mine sweeping games in C language
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd0 in position 0成功解决
Mysql27 index optimization and query optimization
Kubesphere - deploy the actual combat with the deployment file (3)