weixin_43518114 2022-03-27 10:51 采纳率: 50%
浏览 66
已结题

导入别人的.sql文件十几个表只成功了四个表,其余都显示1146和1064错误,如何解决?

img

img


导入别人的.sql文件十几个表只成功了四个表,其余都显示1146和1064错误,搜了很长时间都没找出正确解决方法
/*
/*
Navicat Premium Data Transfer

Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80016
Source Host : localhost:3306
Source Schema : easyweb-shiro

Target Server Type : MySQL
Target Server Version : 80016
File Encoding : 65001

Date: 25/08/2020 22:36:46
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;


-- Table structure for sys_dictionary


DROP TABLE IF EXISTS sys_dictionary;
CREATE TABLE sys_dictionary (
dict_id int(11) NOT NULL AUTO_INCREMENT COMMENT '字典id',
dict_code varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典标识',
dict_name varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典名称',
sort_number int(11) NOT NULL DEFAULT 1 COMMENT '排序号',
comments varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
deleted int(1) NOT NULL DEFAULT 0 COMMENT '是否删除,0否,1是',
create_time timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
update_time timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
PRIMARY KEY (dict_id) USING BTREE,
UNIQUE INDEX dict_code(dict_code) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典' ROW_FORMAT = Dynamic;


-- Records of sys_dictionary


INSERT INTO sys_dictionary VALUES (1, 'sex', '性别', 1, '', 0, '2020-03-15 13:04:39', '2020-03-15 13:04:39');
INSERT INTO sys_dictionary VALUES (2, 'organization_type', '机构类型', 2, '', 0, '2020-03-16 00:32:36', '2020-03-16 00:32:36');


-- Table structure for sys_dictionary_data


DROP TABLE IF EXISTS sys_dictionary_data;
CREATE TABLE sys_dictionary_data (
dict_data_id int(11) NOT NULL AUTO_INCREMENT COMMENT '字典项id',
dict_id int(11) NOT NULL COMMENT '字典id',
dict_data_code varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典项标识',
dict_data_name varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典项名称',
sort_number int(11) NOT NULL DEFAULT 1 COMMENT '排序号',
comments varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
deleted int(1) NOT NULL DEFAULT 0 COMMENT '是否删除,0否,1是',
create_time timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
update_time timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
PRIMARY KEY (dict_data_id) USING BTREE,
INDEX dict_id(dict_id) USING BTREE,
CONSTRAINT sys_dictionary_data_ibfk_1 FOREIGN KEY (dict_id) REFERENCES sys_dictionary (dict_id) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典项' ROW_FORMAT = Dynamic;


-- Records of sys_dictionary_data


INSERT INTO sys_dictionary_data VALUES (1, 1, 'male', '男', 1, '', 0, '2020-03-15 13:07:28', '2020-03-15 13:07:28');
INSERT INTO sys_dictionary_data VALUES (2, 1, 'female', '女', 2, '', 0, '2020-03-15 13:07:41', '2020-03-15 15:58:04');
INSERT INTO sys_dictionary_data VALUES (3, 2, 'company', '公司', 1, '', 0, '2020-03-16 00:34:32', '2020-03-16 00:34:32');
INSERT INTO sys_dictionary_data VALUES (4, 2, 'subsidiary', '子公司', 2, '', 0, '2020-03-16 00:35:02', '2020-03-16 00:35:02');
INSERT INTO sys_dictionary_data VALUES (5, 2, 'department', '部门', 3, '', 0, '2020-03-16 00:35:18', '2020-03-16 00:35:18');
INSERT INTO sys_dictionary_data VALUES (6, 2, 'group', '小组', 4, '', 0, '2020-03-16 00:35:36', '2020-03-16 00:35:36');


-- Table structure for sys_login_record


DROP TABLE IF EXISTS sys_login_record;
CREATE TABLE sys_login_record (
id int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
username varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户账号',
os varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '操作系统',
device varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备名',
browser varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '浏览器类型',
ip varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'ip地址',
oper_type int(11) NOT NULL COMMENT '操作类型,0登录成功,1登录失败,2退出登录,3刷新token',
comments varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
create_time timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '操作时间',
update_time timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
PRIMARY KEY (id) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 63 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '登录日志' ROW_FORMAT = DYNAMIC;
*/

  • 写回答

4条回答 默认 最新

  • 青山Magneto 2022-03-28 14:10
    关注

    MySQL5.5 识别不了timestamp(0),两个解决办法:第一个换成MySQL5.7或者MySQL8;第二个就是自己改下SQL语句中的timestamp(0),改成timestamp

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

问题事件

  • 系统已结题 4月7日
  • 已采纳回答 3月30日
  • 修改了问题 3月27日
  • 创建了问题 3月27日

悬赏问题

  • ¥15 聚类分析 设计C-均值算法分类器,对一组二维模式向量进行分类。
  • ¥15 stm32c8t6工程,使用hal库
  • ¥100 有偿求易语言word文档取doc和docx页数方法或模块
  • ¥15 找能接spark如图片的,可议价
  • ¥15 关于#单片机#的问题,请各位专家解答!
  • ¥15 博通raid 的写入速度很高也很低
  • ¥15 目标计数模型训练过程中的问题
  • ¥100 Acess连接SQL 数据库后 不能用中文筛选
  • ¥15 用友U9Cloud的webapi
  • ¥20 电脑拓展屏桌面被莫名遮挡