| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 898 人关注过本帖
标题:[求助]SQL数据道入的时候出现错误提示,数据库文件有问题
只看楼主 加入收藏
holianchao
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-4-25
收藏
 问题点数:0 回复次数:8 
[求助]SQL数据道入的时候出现错误提示,数据库文件有问题

错误
SQL 查询:

#
# ????浄ʽ?ݿℚȝ `alumni_config`
#
INSERT INTO `alumni_config` ( `id` , `name` , `value` )
VALUES ( 1, 'rowno', '5' ) , ( 2, 'colno', '3' ) , ( 3, 'swidth', '110' ) , ( 4, 'sheight', '110' ) , ( 5, 'adminmail', 'aet_cn@163.net' ) , ( 6, 'totalpm', '10' ) , ( 7, 'totalvister', '271' ) , ( 8, 'audionum', '10' ) , # --------------------------------------------------------
#
# ʽ?ݱ�?ṹ `alumni_forums`
#

DROP TABLE IF EXISTS `alumni_forums` ;

MySQL 返回:

#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 'DROP TABLE IF EXISTS `alumni_forums`' at line 11

这是错误提示,请大家帮我看看 怎么修改,附带远数据库文件

www.love-bar.cn/download/alumni.sql

[此贴子已经被作者于2007-10-4 11:07:19编辑过]

搜索更多相关主题的帖子: SQL 数据库 文件 alumni 
2007-10-03 21:32
purana
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:广东-广州
等 级:版主
威 望:66
帖 子:6039
专家分:0
注 册:2005-6-17
收藏
得分:0 

在mysql里输入source d:\\alumni.sql
执行没有问题.

[CODE]drop database if exists `dbtest`;
create database dbtest;
use dbtest;
DROP TABLE IF EXISTS `alumni_adminnotice`;
CREATE TABLE `alumni_adminnotice` (
`id` tinyint(4) NOT NULL auto_increment,
`title` varchar(40) NOT NULL default '',
`content` mediumtext NOT NULL,
`name` varchar(8) NOT NULL default '',
`time` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
#
# 导出下面的数据库内容 `alumni_adminnotice`
#
# --------------------------------------------------------
#
# 数据表的结构 `alumni_audio`
#
DROP TABLE IF EXISTS `alumni_audio`;
CREATE TABLE `alumni_audio` (
`id` int(11) NOT NULL auto_increment,
`filename` varchar(20) NOT NULL default '',
`whos` varchar(8) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
#
# 导出下面的数据库内容 `alumni_audio`
#
# --------------------------------------------------------
#
# 数据表的结构 `alumni_config`
#
DROP TABLE IF EXISTS `alumni_config`;
CREATE TABLE `alumni_config` (
`id` tinyint(4) NOT NULL auto_increment,
`name` varchar(20) NOT NULL default '',
`value` varchar(20) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
#
# 导出下面的数据库内容 `alumni_config`
#
INSERT INTO `alumni_config` (`id`, `name`, `value`) VALUES (1,
'rowno', '5'),
(2, 'colno', '3'),
(3, 'swidth', '110'),
(4, 'sheight', '110'),
(5, 'adminmail', 'aet_cn@163.net'),
(6, 'totalpm', '10'),
(7, 'totalvister', '271'),
(8, 'audionum', '10');
# --------------------------------------------------------
#
# 数据表的结构 `alumni_forums`
#
DROP TABLE IF EXISTS `alumni_forums`;
CREATE TABLE `alumni_forums` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` char(50) NOT NULL default '',
`active` smallint(6) NOT NULL default '0',
`description` char(255) NOT NULL default '',
`config_suffix` char(50) NOT NULL default '',
`folder` char(1) NOT NULL default '0',
`parent` int(10) unsigned NOT NULL default '0',
`display` int(10) unsigned NOT NULL default '0',
`table_name` char(50) NOT NULL default '',
`moderation` char(1) NOT NULL default 'n',
`email_list` char(50) NOT NULL default '',
`email_return` char(50) NOT NULL default '',
`email_tag` char(50) NOT NULL default '',
`check_dup` smallint(5) unsigned NOT NULL default '0',
`multi_level` smallint(5) unsigned NOT NULL default '0',
`collapse` smallint(5) unsigned NOT NULL default '0',
`flat` smallint(5) unsigned NOT NULL default '0',
`lang` char(50) NOT NULL default '',
`html` char(40) NOT NULL default 'N',
`table_width` char(4) NOT NULL default '',
`table_header_color` char(7) NOT NULL default '',
`table_header_font_color` char(7) NOT NULL default '',
`table_body_color_1` char(7) NOT NULL default '',
`table_body_color_2` char(7) NOT NULL default '',
`table_body_font_color_1` char(7) NOT NULL default '',
`table_body_font_color_2` char(7) NOT NULL default '',
`nav_color` char(7) NOT NULL default '',
`nav_font_color` char(7) NOT NULL default '',
`allow_uploads` char(1) NOT NULL default 'N',
`upload_types` char(100) NOT NULL default '',
`upload_size` int(10) unsigned NOT NULL default '0',
`max_uploads` int(10) unsigned NOT NULL default '0',
`security` int(10) unsigned NOT NULL default '0',
`showip` smallint(5) unsigned NOT NULL default '1',
`emailnotification` smallint(5) unsigned NOT NULL default '1',
`body_color` char(7) NOT NULL default '',
`body_link_color` char(7) NOT NULL default '',
`body_alink_color` char(7) NOT NULL default '',
`body_vlink_color` char(7) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `name` (`name`),
KEY `active` (`active`),
KEY `parent` (`parent`),
KEY `security` (`security`)
) TYPE=MyISAM;
#
# 导出下面的数据库内容 `alumni_forums`
#
INSERT INTO `alumni_forums` (`id`, `name`, `active`,
`description`, `config_suffix`, `folder`, `parent`, `display`,
`table_name`, `moderation`, `email_list`, `email_return`,
`email_tag`, `check_dup`, `multi_level`, `collapse`, `flat`,
`lang`, `html`, `table_width`, `table_header_color`,
`table_header_font_color`, `table_body_color_1`,
`table_body_color_2`, `table_body_font_color_1`,
`table_body_font_color_2`, `nav_color`, `nav_font_color`,
`allow_uploads`, `upload_types`, `upload_size`, `max_uploads`,
`security`, `showip`, `emailnotification`, `body_color`,
`body_link_color`, `body_alink_color`, `body_vlink_color`)
VALUES (2, '友情同学录留言板', 1, '', '', '0', 0, 30,
'alumni_guest', 'n', '', '', '', 1, 2, 1, 1, 'lang/english.php',
'1', '', '#F3CBFF', '#000000', '#F3CBDD', '#F3CBDD', '#000000',
'#000000', '#F3CBDD', '#000000', 'N', '', 0, 0, 0, 1, 0,
'#F3CBDD', '#000000', '#000000', '#000000');
# --------------------------------------------------------
#
# 数据表的结构 `alumni_forums_auth`
#
DROP TABLE IF EXISTS `alumni_forums_auth`;
CREATE TABLE `alumni_forums_auth` (
`id` int(10) unsigned NOT NULL auto_increment,
`sess_id` varchar(32) NOT NULL default '',
`name` varchar(50) NOT NULL default '',
`username` varchar(50) NOT NULL default '',
`password` varchar(50) NOT NULL default '',
`email` varchar(200) NOT NULL default '',
`webpage` varchar(200) NOT NULL default '',
`image` varchar(200) NOT NULL default '',
`icq` varchar(50) NOT NULL default '',
`aol` varchar(50) NOT NULL default '',
`yahoo` varchar(50) NOT NULL default '',
`msn` varchar(50) NOT NULL default '',
`jabber` varchar(50) NOT NULL default '',
`signature` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `name` (`name`),
KEY `username` (`username`),
KEY `sess_id` (`sess_id`),
KEY `password` (`password`)
) TYPE=MyISAM;
#
# 导出下面的数据库内容 `alumni_forums_auth`
#
# --------------------------------------------------------
#
# 数据表的结构 `alumni_forums_moderators`
#
DROP TABLE IF EXISTS `alumni_forums_moderators`;
CREATE TABLE `alumni_forums_moderators` (
`user_id` int(10) unsigned NOT NULL default '0',
`forum_id` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`user_id`,`forum_id`),
KEY `forum_id` (`forum_id`)
) TYPE=MyISAM;
#
# 导出下面的数据库内容 `alumni_forums_moderators`
#
INSERT INTO `alumni_forums_moderators` (`user_id`, `forum_id`)
VALUES (1, 0);
# --------------------------------------------------------
#
# 数据表的结构 `alumni_guest`
#
DROP TABLE IF EXISTS `alumni_guest`;
CREATE TABLE `alumni_guest` (
`id` int(10) unsigned NOT NULL default '0',
`datestamp` datetime NOT NULL default '0000-00-00 00:00:00',
`thread` int(10) unsigned NOT NULL default '0',
`parent` int(10) unsigned NOT NULL default '0',
`author` char(37) NOT NULL default '',
`subject` char(255) NOT NULL default '',
`email` char(200) NOT NULL default '',
`host` char(50) NOT NULL default '',
`email_reply` char(1) NOT NULL default 'N',
`approved` char(1) NOT NULL default 'N',
`msgid` char(100) NOT NULL default '',
`modifystamp` int(10) unsigned NOT NULL default '0',
`userid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `author` (`author`),
KEY `userid` (`userid`),
KEY `datestamp` (`datestamp`),
KEY `subject` (`subject`),
KEY `thread` (`thread`),
KEY `parent` (`parent`),
KEY `approved` (`approved`),
KEY `msgid` (`msgid`),
KEY `modifystamp` (`modifystamp`)
) TYPE=MyISAM;
#
# 导出下面的数据库内容 `alumni_guest`
#

#
# 数据表的结构 `alumni_guest_bodies`
#
DROP TABLE IF EXISTS `alumni_guest_bodies`;
CREATE TABLE `alumni_guest_bodies` (
`id` int(10) unsigned NOT NULL auto_increment,
`body` text NOT NULL,
`thread` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `thread` (`thread`)
) TYPE=MyISAM;
#
# 导出下面的数据库内容 `alumni_guest_bodies`
#

# --------------------------------------------------------
#
# 数据表的结构 `alumni_photo`
#
DROP TABLE IF EXISTS `alumni_photo`;
CREATE TABLE `alumni_photo` (
`id` tinyint(4) NOT NULL auto_increment,
`name` varchar(35) NOT NULL default '',
`title` varchar(20) NOT NULL default '',
`disc` mediumtext NOT NULL,
`user` varchar(8) NOT NULL default '',
`time` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
#
# 导出下面的数据库内容 `alumni_photo`
#

# --------------------------------------------------------
#
# 数据表的结构 `alumni_pm`
#
DROP TABLE IF EXISTS `alumni_pm`;
CREATE TABLE `alumni_pm` (
`id` tinyint(4) NOT NULL auto_increment,
`title` varchar(50) NOT NULL default '',
`content` mediumtext NOT NULL,
`sender` varchar(8) NOT NULL default '',
`receiver` varchar(8) NOT NULL default '',
`sendtime` datetime NOT NULL default '0000-00-00 00:00:00',
`stat` char(1) NOT NULL default '',
`readed` char(1) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
#
# 导出下面的数据库内容 `alumni_pm`
#

# --------------------------------------------------------
#
# 数据表的结构 `alumni_student`
#
DROP TABLE IF EXISTS `alumni_student`;
CREATE TABLE `alumni_student` (
`id` tinyint(4) NOT NULL auto_increment,
`stuname` varchar(8) NOT NULL default '',
`stuno` varchar(15) NOT NULL default '',
`reged` char(2) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
#
# 导出下面的数据库内容 `alumni_student`
#
# --------------------------------------------------------
#
# 数据表的结构 `alumni_user`
#
DROP TABLE IF EXISTS `alumni_user`;
CREATE TABLE `alumni_user` (
`id` tinyint(4) NOT NULL auto_increment,
`stuid` tinyint(4) NOT NULL default '0',
`pass` varchar(18) NOT NULL default '',
`email` varchar(50) NOT NULL default '',
`homepage` varchar(100) NOT NULL default '',
`qq` varchar(10) NOT NULL default '0',
`msn` varchar(50) NOT NULL default '',
`tel` varchar(15) NOT NULL default '0',
`address` varchar(100) NOT NULL default '',
`lognum` tinyint(5) NOT NULL default '0',
`jifen` tinyint(6) NOT NULL default '0',
`levle` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `id` (`id`)
) TYPE=MyISAM;[/CODE]


我的msn: myfend@
2007-10-03 21:46
holianchao
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-4-25
收藏
得分:0 
回复:(purana)在mysql里输入source d:\\\\alumni.sql...
运行没问题,那为什么我道入数据库去给我提示说,有错误呀?谢谢帮忙了 呵呵 ,在建一个同学录,请大家多多给点建议,谢谢了
2007-10-03 21:55
purana
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:广东-广州
等 级:版主
威 望:66
帖 子:6039
专家分:0
注 册:2005-6-17
收藏
得分:0 
你用我上面的代码去替换你的文件就行了.我改了一点.

我的msn: myfend@
2007-10-03 22:04
holianchao
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-4-25
收藏
得分:0 
回复:(purana)你用我上面的代码去替换你的文件就行...
谢谢你的帮助了  
2007-10-03 22:06
holianchao
Rank: 1
等 级:新手上路
帖 子:14
专家分:0
注 册:2007-4-25
收藏
得分:0 
回复:(purana)你用我上面的代码去替换你的文件就行...

大哥,在帮忙 ,谢谢了
现在我能到入数据了,但是安装同学录的时候在第二部的时候显示了这个,你能帮我看一下这是什么原因吗?谢谢


Warning: mysql_pconnect() [function.mysql-pconnect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/.taragon/lovebar/love-bar.cn/alumni/config.php on line 1

Warning: mysql_select_db() [function.mysql-select-db]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/.taragon/lovebar/love-bar.cn/alumni/config.php on line 1

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in /home/.taragon/lovebar/love-bar.cn/alumni/config.php on line 1

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/.taragon/lovebar/love-bar.cn/alumni/install/2.php on line 8

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/.taragon/lovebar/love-bar.cn/alumni/install/2.php on line 8

Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/.taragon/lovebar/love-bar.cn/alumni/install/2.php on line 9

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/.taragon/lovebar/love-bar.cn/alumni/install/2.php on line 9

[此贴子已经被作者于2007-10-4 11:16:03编辑过]

2007-10-04 11:05
purana
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:广东-广州
等 级:版主
威 望:66
帖 子:6039
专家分:0
注 册:2005-6-17
收藏
得分:0 
你的是php?.
我不懂php哦.

我的msn: myfend@
2007-10-04 17:29
风月_无边
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:60
帖 子:2960
专家分:652
注 册:2007-1-19
收藏
得分:0 
很明顯﹐于數據庫的連接有問題。

我的网站 http://www.
2007-10-04 17:49
随缘小强
Rank: 1
等 级:新手上路
帖 子:23
专家分:0
注 册:2007-10-29
收藏
得分:0 
不用pconnect(),用connect()看看~~
2007-11-01 13:11
快速回复:[求助]SQL数据道入的时候出现错误提示,数据库文件有问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.033204 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved