win7往mysql导入sql文件报错

feichanghunger 2018-02-14 10:13:47
错误是
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to
sql文件是
create table customers
( customerid int unsigned not null auto_increment primary key,
name char(50) not null,
address char(100) not null,
city char(30) not null
);

create table orders
( orderid int unsigned not null auto_increment primary key,
customerid int unsigned not null,
amount float(6,2),
date date not null
);

create table books
( isbn char(13) not null primary key,
author char(50),
title char(100),
price float(4,2)
);

create table order_items
( orderid int unsigned not null,
isbn char(13) not null,
quantity tinyint unsigned,

primary key (orderid, isbn)

);
create table book_reviews
(
isbn char(13) not null primary key,
review text
);


求大神解答,感谢
...全文
1161 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
feichanghunger 2018-03-01
  • 打赏
  • 举报
回复
可能是导入重复或者是用户没有权限,用root删除导入的,用root重新导入就好了,谢谢大家的帮助
深圳phper 2018-02-26
  • 打赏
  • 举报
回复
你MYSQL是什么版本的,我执行了下也没问题呀
xuzuning 2018-02-14
  • 打赏
  • 举报
回复
测试了一次,并未发现有错误

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧