天天看點

安裝bugzilla卡在驗證mysql連接配接失敗

  There was an error connecting to MySQL:

安裝bugzilla卡在驗證mysql連接配接失敗

  install_driver(mysql) failed: Attempt to reload DBD/mysql.pm aborted.

Compilation failed in require at (eval 1260) line 3, <DATA> chunk 558.

 at Bugzilla/DB.pm line 1284

This might have several reasons:

* MySQL is not running.

* MySQL is running, but there is a problem either in the

  server configuration or the database access rights. Read the Bugzilla

  Guide in the doc directory. The section about database configuration

  should help.

* Your password for the 'bugs' user, specified in $db_pass, is

  incorrect, in './localconfig'.

* There is a subtle problem with Perl, DBI, or MySQL. Make

  sure all settings in './localconfig' are correct. If all else fails, set

  '$db_check' to 0.

翻譯過來是

有一個連接配接到MySQL的錯誤:

    install_driver(MySQL的)失敗:嘗試重新加載DBD / mysql.pm中止。

編譯失敗,需要在(EVAL1260)3号線,<DATA>塊558。

 在Bugzilla的/ DB.pm線1284

這可能有以下幾個原因:

* MySQL未運作。

* MySQL的運作,但有一個問題,無論是在

  伺服器配置或資料庫的通路權限。閱讀的Bugzilla

  doc目錄中的指南。關于資料庫配置的部分

  應該會有所幫助。

*您的密碼“錯誤的使用者,$ db_pass指定,

  不正确,在'。/ localconfig'。

*用Perl DBI,或MySQL是一個微妙的問題。使

  确定“。/ localconfig中的所有設定都是正确的。如果一切都失敗,設定

  '$ db_check'為0。

我的解決方案:DOS指令下:ppm upgrade DBI.就可以了。希望對後來百度到這篇文檔的人能有所幫忙。理由:我判斷是perl連接配接mysql的問題,然後我開始下載下傳了DBD-mysql-4.022安裝還是沒有用,後來在國外的論壇上看見這個解決方案!

我用的Bugzilla版本是4.4.4.登陸界面送出bug之前,頁面是正常的。但是一旦送出bug就會報錯。以下是浏覽器的錯誤:

Software error:

Cannot determine local time zone

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

[Wed Jun 25 10:43:57 2014] post_bug.cgi: Cannot determine local time zone 

解決:

我也是頭痛了很久,後來發現一種辦法,為了大家,不要分也無所謂了

修改 Bugzilla/Util.pm

use Date::Parse;

use Date::Format;

# 增加如下

BEGIN { $ENV{TZ} = ‘Asia/Shanghai’; } 

use DateTime;

use DateTime::TimeZone;

use Text::Wrap;

然後再編譯一次Bugzilla。在windows下就是執行checksetup.pl

///方法二

樓主是不是Windows環境 如果是windows環境記得要裝DateTime::TimeZone::Local::Win32,不然就會中這個問題。

Special Case Platforms

If you are on the Win32 platform, you will want to also install DateTime::TimeZone::Local::Win32. This will enable you to specify a time zone of 'local' when creating a DateTime object.

參看:

http://search.cpan.org/dist/DateTime-TimeZone/lib/DateTime/TimeZone.pm