请教--mysql 导入.sql文件时出的错误
请高人帮我解答一下,谢谢
作者: zhiqiushangjin 发布时间: 2011-06-07
作者: wwwwb 发布时间: 2011-06-07
作者: ACMAIN_CHM 发布时间: 2011-06-07
source F:\sheji\final\dbinit\createtable.sql;
内容如下:
drop database if exists xindou;
--瀵ゆ椽鍣烽弫鐗堝祦鎼存挸绨眡indou閿涘苯鑻熼幐鍥х暰鐟欙絿鐖滈梿鍡曡礋gb2312
--create database if not exists xindou default character set gb2312;
--瀵ゆ椽鍣烽弫鐗堝祦鎼存挸绨眡indou閿涘苯鑻熼幐鍥х暰鐟欙絿鐖滈梿鍡曡礋utf8
create database if not exists xindou default character set utf8;
--娴h法鏁ら弫鐗堝祦鎼?
use xindou;
--閸掑棛琚悰?
drop table if exists category;
create table if not exists category(
id int not null primary key auto_increment,
cname varchar(20) not null,
parentid int not null default 0,
description varchar(200),
photo blob,
ctype tinyint default 1
) ENGINE=InnoDB;
作者: zhiqiushangjin 发布时间: 2011-06-07
作者: wwwwb 发布时间: 2011-06-07
作者: zhiqiushangjin 发布时间: 2011-06-07
--create database if not exists xindou default character set gb2312;
--瀵ゆ椽鍣烽弫鐗堝祦鎼存挸绨眡indou閿涘苯鑻熼幐鍥х暰鐟欙絿鐖滈梿鍡曡礋utf8
这些语句显然不对。 你的这个 F:\sheji\final\dbinit\createtable.sql; 是哪儿来的?本身就有问题啊。 直接用记事本打开看看内容是什么。
作者: ACMAIN_CHM 发布时间: 2011-06-07
source F:\sheji\final\dbinit\createtable.sql;
提示什么
作者: wwwwb 发布时间: 2011-06-07
作者: zhiqiushangjin 发布时间: 2011-06-07
作者: ACMAIN_CHM 发布时间: 2011-06-07
作者: zhiqiushangjin 发布时间: 2011-06-07
MYSQL的 -- 后需要跟一个空格以标识为注释。
作者: ACMAIN_CHM 发布时间: 2011-06-07
是这个样子
--GWAP2.0-閺傛媽鐪寸純鎴濈紦鐞涖劏鍓奸張?
--閸掔娀娅庨弫鐗堝祦鎼存挸绨眡indou
drop database if exists xindou;
--瀵ゆ椽鍣烽弫鐗堝祦鎼存挸绨眡indou閿涘苯鑻熼幐鍥х暰鐟欙絿鐖滈梿鍡曡礋gb2312
--create database if not exists xindou default character set gb2312;
--瀵ゆ椽鍣烽弫鐗堝祦鎼存挸绨眡indou閿涘苯鑻熼幐鍥х暰鐟欙絿鐖滈梿鍡曡礋utf8
create database if not exists xindou default character set utf8;
--娴h法鏁ら弫鐗堝祦鎼?
use xindou;
--閸掑棛琚悰?
drop table if exists category;
create table if not exists category(
id int not null primary key auto_increment,
cname varchar(20) not null,
parentid int not null default 0,
description varchar(200),
photo blob,
ctype tinyint default 1
) ENGINE=InnoDB;
作者: zhiqiushangjin 发布时间: 2011-06-07