bugzilla installation error :"InnoDB is disabled your MySQL installation. Bugzilla requires InnoDb to be enabled." even if innodb is enabled

StackOverflow https://stackoverflow.com/questions/15359467

  •  23-03-2022
  •  | 
  •  

문제

i have installed bugzilla4.2.5 in my windows7 machine. When i am ruuning the checksetup.pl script of bugzilla , it showing that

Use of uninitialized value $innodb_on in string ne at Bugzilla/DB/Mysql.pm line no 330."InnoDB is disabled your MySQL installation. Bugzilla requires InnoDb to be enabled. Please enable it and then re-runchecksetup.pl".

the code segement indicated by the line no in the Mysql.pm is the following

 my ($innodb_on) = @{$self->selectcol_arrayref(
    q{SHOW VARIABLES LIKE '%have_innodb%'}, {Columns=>[2]})};
if ($innodb_on ne 'YES') {
    die install_string('mysql_innodb_disabled');
}

My Mysql installed version is 5.6.4-m7 . And i have found out that command SHOW VARIABLES LIKE '%have_innodb% returns an empty set. But SHOW ENGINES shwing the innodb and it is enabled and set as default.

I suppose the bugzilla showing error because SHOW VARIABLES LIKE '%have_innodb% returns empty set inside the code in Mysql.pm file also.

http://bugs.mysql.com/bug.php?id=63383 this link showing that "have_innodb" variable is removed from MySQL 5.6.1. Does that mean that i need to install an older version of mysql that contain the "have_innodb" variable? Please help me to solve the problem in the bugzilla installation.

도움이 되었습니까?

해결책 2

I finally fixed the problem. There are two options for solve this issue: One is install a lower version of MySQL than MySQL5.6 or Change the Bugzilla source code. In the Mysql.pm, instead of using the command SHOW VARIABLES LIKE '%have_innodb%' use the SHOW ENGINES to check if innodb is enabled and set the the value to $innodb_on variable.

다른 팁

Here is the bugzilla source code change when useing MySQL 5.6 or higher

please replace :

my ($innodb_on) = @{$self->selectcol_arrayref(
q{SHOW VARIABLES LIKE '%have_innodb%'}, {Columns=>[2]})};
if ($innodb_on ne 'YES') {
    die install_string('mysql_innodb_disabled');
}

with:

my ($innodb_on) = 
    grep{ $_->{engine} =~ m/InnoDB/i }
    map  {
        my %hash;
        @hash{ map { lc $_ } keys %$_ } = values %$_;
        \%hash;
    }
    @{$self->selectall_arrayref("SHOW ENGINES", {Slice=>{}}) };
if ( $innodb_on ) {
    if ( !$innodb_on->{support} =~ m/YES|DEFAULT/i ) {
        die install_string('mysql_innodb_disabled');
}
}

I simply changed the check from "ne" to "eq" which is completely wrong but gives the correct behavior, apparently.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top