mysql - 即使启用了 innodb,bugzilla 安装错误 :"InnoDB is disabled your MySQL installation. Bugzilla requires InnoDb to be enabled."

标签 mysql innodb bugzilla

我已经在我的 windows7 机器上安装了 bugzilla4.2.5。当我运行 bugzilla 的 checksetup.pl 脚本时,它显示

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".

Mysql.pm中第no行表示的代码段如下

 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');
}

我的Mysql安装版本是5.6.4-m7。我发现命令 SHOW VARIABLES LIKE '%have_innodb% 返回一个空集。但是 SHOW ENGINES 显示了 innodb,它已启用并设置为默认值。

我想 bugzilla 显示错误是因为 SHOW VARIABLES LIKE '%have_innodb% 也在 Mysql.pm 文件的代码中返回空集。

http://bugs.mysql.com/bug.php?id=63383此链接显示“have_innodb”变量已从 MySQL 5.6.1 中删除。 这是否意味着我需要安装包含“have_innodb”变量的旧版本的 mysql? 请帮助我解决 bugzilla 安装中的问题。

最佳答案

这是使用 MySQL 5.6 或更高版本时的 bugzilla 源代码更改

替换:

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 ($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');
}
}

关于mysql - 即使启用了 innodb,bugzilla 安装错误 :"InnoDB is disabled your MySQL installation. Bugzilla requires InnoDb to be enabled.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15359467/

相关文章:

python - 如何远程控制 Bugzilla(首选 Python)

MySQL 触发器。需要示例答案

MySQL 查找比需要更多的行(索引问题)

mysql - Magento MySQL 数据库死锁

mysql - bugzilla: install-module.pl GD 返回显示错误

perl - Bugzilla-VCS 安装 Extension.pm 中出现错误

mysql - 为什么 MysqlCommand.ExecuteScalar 返回 System.NullReferenceException

php - 使用通配符选择所有以 XXX 开头的列?

MySQL TokuDB 引擎使用过多 CPU

mysql - AWS MySQL 5.6.40 - 一次不知所措,永远不知所措