


处理方法: 查了相关资料才知道 MySql 5.5和MySql 5.6之后版本的区别:5.5 只能有一个Timestamp,将其中一列类型改为datetime类型就可以解决。
也支持mysql5.7导入5.5
未做处理的表文件语句如下:
1、备份远程数据转存为sql文件,将其中一列类型Timestamp改为datetime,比如上述错误表改为:create table 'order_master' (
'order_id' varchar(32) not null,
'buyer_name' varchar(32) not null comment '买家名字',
'buyer_phone' varchar(32) not null comment '买家电话',
'buyer_address' varchar(128) not null comment '买家地址',
'buyer_openid' varchar(64) not null comment '买家微信openid',
'order_amount' decimal(8,2) not null comment '订单总金额',
'order_status' tinyint(3) not null default '0' comment '订单状态,默认0新订单'
'pay_status' tinyint(3) not null default '0' comment '订单状态,默认0未支付'
'create_time' timestamp not null default current_timestamp comment '创建时间',
'update_time' timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
primary key ('order_id'),
key 'idx_buyer_openid' ('buyer_openid')
) comment '订单表';
create table 'order_master' (
'order_id' varchar(32) not null,
'buyer_name' varchar(32) not null comment '买家名字',
'buyer_phone' varchar(32) not null comment '买家电话',
'buyer_address' varchar(128) not null comment '买家地址',
'buyer_openid' varchar(64) not null comment '买家微信openid',
'order_amount' decimal(8,2) not null comment '订单总金额',
'order_status' tinyint(3) not null default '0' comment '订单状态,默认0新订单'
'pay_status' tinyint(3) not null default '0' comment '订单状态,默认0未支付'
'create_time' datetime not null comment '创建时间',
'update_time' timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
primary key ('order_id'),
key 'idx_buyer_openid' ('buyer_openid')
) comment '订单表';
2、修改后保存sql文件,在导入即可正常导入了,



文章评论 本文章有个评论