如图所示,将sql文件导进navicat报错:
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',create_user
' at line 7
应该是前面那个字段设置默认时间数据时用法错了。
验证方法:去掉所有的 default current_timestamp 后再运行试试,然后根据参考文章,设置一下长度参数跟字段长度一致。
参考https://www.2cto.com/database/201808/773374.html