51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 4285|回复: 10
打印 上一主题 下一主题

[原创] 请教安装bugzilla过程中出现的问题,无法连接到的数据库

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2006-5-18 17:21:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我是在windous2000下装的。
perl 5.8.4+MySQL5.0.18(win32)+bugzilla2.17.6(已经改完的)
把bugzilla安装完了,perl模块也装完了并且全都识别,但最后输入perl checkstup.pl 却显示无法连接bugs数据库,
以下是错误代码,我已经装第2天了。有点郁闷了!

E:\>cd bugzilla

E:\Bugzilla>perl checksetup.pl
Found = in conditional, should be == at checksetup.pl line 1219.

Checking perl modules ...
Checking for       AppConfig (v1.52)   ok: found v1.52
Checking for             CGI (v2.93)   ok: found v3.04
Checking for    Data::Dumper (any)     ok: found v2.121
Checking for    Date::Format (v2.21)   ok: found v2.22
Checking for             DBI (v1.32)   ok: found v1.34
Checking for      DBD::mysql (v2.1010) ok: found v2.1026
Checking for      File::Spec (v0.82)   ok: found v0.87
Checking for      File::Temp (any)     ok: found v0.14
Checking for        Template (v2.08)   ok: found v2.13
Checking for      Text::Wrap (v2001.0131) ok: found v2001.09291

The following Perl modules are optional:
Checking for              GD (v1.20)   ok: found v2.12
Checking for     Chart::Base (v0.99)   ok: found v2.4.1
Checking for     XML::Parser (any)     ok: found v2.34
Checking for       GD::Graph (any)     ok: found v1.4307
Checking for GD::Text::Align (any)     ok: found v1.18
Checking for     PatchReader (any)     ok: found v0.9.2

Checking user setup ...
Removing existing compiled templates ...
Precompiling templates ...
[Thu May 18 16:40:00 2006] checksetup.pl: DBI connect(';localhost;3306','bugs',.
..) failed: Client does not support authentication protocol requested by server;
consider upgrading MySQL client at checksetup.pl line 1332
<h1>Software error:</h1>
<pre>Can't connect to the mysql database. Is the database installed and
up and running?  Do you have the correct username and password selected in
localconfig?

</pre>
<p>
For help, please send mail to this site's webmaster, giving this error message
and the time and date of the error.

</p>
[Thu May 18 16:40:00 2006] checksetup.pl: Can't connect to the mysql database. I
s the database installed and
[Thu May 18 16:40:00 2006] checksetup.pl: up and running?  Do you have the corre
ct username and password selected in
[Thu May 18 16:40:00 2006] checksetup.pl: localconfig?
[Thu May 18 16:40:00 2006] checksetup.pl:
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
 楼主| 发表于 2006-5-18 17:23:29 | 只看该作者
我的localconfig配置文件:


$index_html = 1;


#
# In order to do certain functions in Bugzilla (such as sync the shadow
# database), we require the MySQL Binaries (mysql, mysqldump, and mysqladmin).
# Because it's possible that these files aren't in your path, you can specify
# their location here.
# Please specify only the directory name, with no trailing slash.
$mysqlpath = "c:\\mysql\\bin";


#
# For some optional functions of Bugzilla (such as the pretty-print patch
# viewer), we need the cvs binary to access files and revisions.
# Because it's possible that this program is not in your path, you can specify
# its location here.  Please specify the full path to the executable.
$cvsbin = "";



#
# For some optional functions of Bugzilla (such as the pretty-print patch
# viewer), we need the interdiff binary to make diffs between two patches.
# Because it's possible that this program is not in your path, you can specify
# its location here.  Please specify the full path to the executable.
$interdiffbin = "";



#
# The interdiff feature needs diff, so we have to have that path.
# Please specify only the directory name, with no trailing slash.
$diffpath = "";


#
# If you are using Apache for your web server, Bugzilla can create .htaccess
# files for you that will instruct Apache not to serve files that shouldn't
# be accessed from the web (like your local configuration data and non-cgi
# executable files).  For this to work, the directory your Bugzilla
# installation is in must be within the jurisdiction of a <Directory> block
# in the httpd.conf file that has 'AllowOverride Limit' in it.  If it has
# 'AllowOverride All' or other options with Limit, that's fine.
# (Older Apache installations may use an access.conf file to store these
# <Directory> blocks.)
# If this is set to 1, Bugzilla will create these files if they don't exist.
# If this is set to 0, Bugzilla will not create these files.
$create_htaccess = 1;



#
# This is the group your web server runs on.
# If you have a windows box, ignore this setting.
# If you do not have access to the group your web server runs under,
# set this to "". If you do set this to "", then your Bugzilla installation
# will be _VERY_ insecure, because some files will be world readable/writable,
# and so anyone who can get local access to your machine can do whatever they
# want. You should only have this set to "" if this is a testing installation
# and you cannot set this up any other way. YOU HAVE BEEN WARNED.
# If you set this to anything besides "", you will need to run checksetup.pl
# as root, or as a user who is a member of the specified group.
$webservergroup = "8";



#
# How to access the SQL database:
#
$db_host = "localhost";         # where is the database?
$db_port = 3306;                # which port to use
$db_name = "bugs";              # name of the MySQL database
$db_user = "bugs";              # user to attach to the MySQL database



#
# Enter your database password here. It's normally advisable to specify
# a password for your bugzilla database user.
# If you use apostrophe (') or a backslash (\) in your password, you'll
# need to escape it by preceding it with a \ character. (\') or (\\)
#
$db_pass = '125428';



# Enter a path to the unix socket for mysql. If this is blank, then mysql's
# compiled-in default will be used. You probably want that.
$db_sock = '';



#
# Should checksetup.pl try to check if your MySQL setup is correct?
# (with some combinations of MySQL/Msql-mysql/Perl/moonphase this doesn't work)
#
$db_check = 1;



#
# Which bug and feature-request severities do you want?
#
@severities = (
        "blocker",
        "critical",
        "major",
        "normal",
        "minor",
        "trivial",
        "enhancement"
);



#
# Which priorities do you want to assign to bugs and feature-request?
#
@priorities = (
        "P1",
        "P2",
        "P3",
        "P4",
        "P5"
);



#
# What operatings systems may your products run on?
#
@opsys = (
        "All",
        "Windows 3.1",
        "Windows 95",
        "Windows 98",
        "Windows ME",  # Millenium Edition (upgrade of 98)
        "Windows 2000",
        "Windows NT",
        "Windows XP",
        "Windows Server 2003",
        "Mac System 7",
        "Mac System 7.5",
        "Mac System 7.6.1",
        "Mac System 8.0",
        "Mac System 8.5",
        "Mac System 8.6",
        "Mac System 9.x",
        "Mac OS X 10.0",
        "Mac OS X 10.1",
        "Mac OS X 10.2",
        "Linux",
        "BSD/OS",
        "FreeBSD",
        "NetBSD",
        "OpenBSD",
        "AIX",
        "BeOS",
        "HP-UX",
        "IRIX",
        "Neutrino",
        "OpenVMS",
        "OS/2",
        "OSF/1",
        "Solaris",
        "SunOS",
        "other"
);



#
# What hardware platforms may your products run on?
#
@platforms = (
        "All",
        "DEC",
        "HP",
        "Macintosh",
        "PC",
        "SGI",
        "Sun",
        "Other"
回复 支持 反对

使用道具 举报

该用户从未签到

3#
 楼主| 发表于 2006-5-18 17:27:58 | 只看该作者
前提是mysql已启动,数据库中有bugs数据库与bugs用户名,且密码125428已经设置好,并把bugs用户指向bugs数据库,

另外我还想问要是用mysqlcc图形管理是不是一定要装mysqlodbc啊??
如果要装mysqlodbc的话该怎么设置?


谢谢!
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2006-5-18 17:33:23 | 只看该作者
在线等!或者QQ上说也行!20435851
回复 支持 反对

使用道具 举报

该用户从未签到

5#
 楼主| 发表于 2006-5-18 23:08:19 | 只看该作者
怎么没人回啊!!
回复 支持 反对

使用道具 举报

该用户从未签到

6#
发表于 2006-5-19 01:08:29 | 只看该作者
看看以下有没有帮助:
http://www.websina.com/cn/install.html
回复 支持 反对

使用道具 举报

该用户从未签到

7#
发表于 2006-5-19 09:27:45 | 只看该作者
1) 打开E:\Bugzilla\checksetup.pl,进行如下修改。
找到my $mysql_binaries = 'which mysql'; 改为 my $mysql_binaries = "E:\\MySQL\\bin\\mysql";   
注意双引号!!
找到my $webservergid = getgrnam($my_webservergroup) 改为my $webservergid = '8'

不知道你这一步修改过没.如果还有问题,应该就是你的mysql安装可能有问题,建议按照下面的步骤重新配置mysql:
2). 创建bugs用户,并赋给相应的权限:
mysql>GRANT SELECT, INSERT, UPDATE, DELETE, INDEX, ALTER, CREATE, DROP, REFERENCES, LOCK TABLES, CREATE
TEMPORARY TABLES ON bugs.* TO bugs@localhost IDENTIFIED BY 'yourPWD';
mysql> FLUSH PRIVILEGES;
说明:要记住bugs用户的密码,在下面的bugzilla配置文件要用。

3). 创建bugs数据库:
mysql>create database bugs;
mysql>exit
如果已经存在bugs数据库,可以在这之前先删除数据库bugs,用如下命令:
mysql>drop database bugs;

如果还不能解决,再联系:)

ps:mysql图形管理工具好像不只mysqlcc一种,你可以去华军上搜mysql看看,找到别的一些mysql图形管理工具
回复 支持 反对

使用道具 举报

该用户从未签到

8#
 楼主| 发表于 2006-5-19 15:48:38 | 只看该作者
谢谢楼上两位,
我用的MYSQL图形管理工具是EMS SQL Manager 2005 Lite for MySQL
进去后(是用root进的)也看过只有一个bugs(用户和数据库),而且用bugs用户登陆正常,
或许是Client出问题了!
按你的方法装完后,错误跟我上面的一样!
我想是客户端的问题了!
我装MYSQL时一路next,最后全部装完
是不是还要再装一次客户端呢??
回复 支持 反对

使用道具 举报

该用户从未签到

9#
 楼主| 发表于 2006-5-19 16:56:51 | 只看该作者
我的checkstup.pl文件中已经改过!
my $mysql_binaries = "c:\\MySQL\\bin\\mysql";   
my $webservergid = '8'


这块不改么?
# $answer{'db_host'} = '$db_host = "localhost";
# $db_port = 3306;
# $db_name = "mydbname";
# $db_user = "mydbuser";';
回复 支持 反对

使用道具 举报

该用户从未签到

10#
发表于 2006-5-21 21:35:28 | 只看该作者
5.安装Bugzilla

**
0).修改.cgi文件
    打开D:\Bugzilla下所有(很多:)的.cgi文件,将第一行最后的T字符去掉,如下:
例如:#!/usr/bin/perl –wT  改为  #!/usr/bin/perl -w
**

1).修改checksetup.pl脚本
   打开D:\Bugzilla\checksetup.pl,进行如下修改。
找到my $mysql_binaries = 'which mysql'; 改为 my $mysql_binaries = "D:\\MySQL\\bin\\mysql";   
注意双引号!!
找到my $webservergid = getgrnam($my_webservergroup) 改为my $webservergid = '8'
注意保存!
   (现在可以在DOS命令行,进入D:\Bugzilla,输入perl checksetup.pl,看看有什么提示信息。)

2).再次打开D:\Bugzilla\checksetup.pl,注释掉以下与平台相关的代码:
$SIG{HUP} = \&bailout;
$SIG{INT} = \&bailout;
$SIG{QUIT} = \&bailout;
$SIG{TERM} = \&bailout;
system("stty","-echo"); # disable input echoing
即在每行前面加注#

3).更正回车换行问题,这是由于Unix与Windows平台差异造成的:Unix的回车换行是 \n,而Windows是 \r\n,因此需要
去掉一个字符。
找到chomp $login; 在其后增加一行chop $login;
找到chomp $realname; 在其后增加一行chop $realname;
找到chomp $pass1; 在其后增加一行chop $pass1;
找到chomp $pass2; 在其后增加一行chop $pass2;

4).预安装Bugzilla
进入cmd.exe
D:\>cd Bugzilla
D:\>perl cheksetup.pl
这时会生成一些文件,打开生成的localconfig文件(在D:\Bugzilla下),修改如下信息:
$index_html = 1 (生成index.html)
$mysqlpath = "D:\MySQL\bin" (你的MySQL\bin路径)
$webservergroup = "8"
$db_user = "bugs" (MySQL的登陆用户名)
$db_pass = 'yourPWD'(MySQL bugs用户的登陆密码)

5).正式安装Bugzilla
再次进入cmd.exe
D:\>cd Bugzilla
D:\>perl cheksetup.pl
    如果一切顺利的话,系统提示创建Administrator的相关邮件(用户登陆名)、Realname、登陆密码等资料。最后,
如果成功,会提示
your@email is now set up as an administrator account.
Reminder: Bugzilla now requires version 8.7 or later of sendmail!
这就算是成功了!Good luck!!
回复 支持 反对

使用道具 举报

该用户从未签到

11#
发表于 2006-5-21 21:38:46 | 只看该作者
我安装的是Bugzilla-2.17.4,,mysql-4.1.18。

推荐你安装Bugzilla-2.20版本。这个版本安装要修改的东西少一点。而且也支持新功能。
回复 支持 反对

使用道具 举报

本版积分规则

关闭

站长推荐上一条 /1 下一条

小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

GMT+8, 2024-11-15 11:56 , Processed in 0.068084 second(s), 26 queries .

Powered by Discuz! X3.2

© 2001-2024 Comsenz Inc.

快速回复 返回顶部 返回列表