Unable to install MAHARA 20.10 on Mysql 5.6

Bug #1909116 reported by james william
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned

Bug Description

Hi,

I tried installing Mahara 20.10.0 on PHP 7.2 and MYSQL 5.6 However I am unable to install it with Mysql 5.6 Getting "failed to upgrade" error message on installing core module.

I also tried to install it with Mysql 5.7 and its working fine.

Does Mahara supports Mysql 5.6 ? If not then please change the docs for minimum requirements. https://github.com/MaharaProject/mahara/blob/20.10.0_RELEASE/README.md#system-requirements

Revision history for this message
james william (william1212) wrote :

Its been many days and still not getting any reply from Mahara team.

Awaiting your response on this.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hi James,

Thank you for your patience. What is the error message you get in the error log when the install fails please?

Thank you
Kristina

Changed in mahara:
status: New → Incomplete
Revision history for this message
james william (william1212) wrote :

Hi,

My dataroot directory's log directory is empty.

However I tried accessing my apache logs with is huge out of which I am posting here a error which I think is restricting.

[Tue Feb 16 02:40:08 2021] [notice] [client {{IP}}] [DBG] c7 (lib/dml.php:181) mysqli error: [1071: Specified key was too long; max key length is 767 bytes] in EXECUTE("CREATE TABLE premh_config (, referer: http://domain.com/mahara20100/admin/upgrade.php

Revision history for this message
Robert Lyon (robertl-9) wrote :

Hi James,

It turns out that now we want to run Mahara with a utf8mb4 database it will not actually install under Mysql 5.6.

The best thing to do would be to upgrade your Mysql to 5.7 (as that can handle longer column index strings)

But if that is not possible then you could switch to utf8 (from utf8mb4), if you don't need support for certain languages, eg Chinese, or need to store emoji characters.

For it to install you would need to make the following changes:

1) create the database in utf8 eg:
  create database `mydatabase` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci;

2) edit the /htdocs/lib/dml.php file and change
         $result = $db->_Execute("SHOW VARIABLES LIKE 'character_set_database'");
- return preg_match('/^utf8mb4/', $result->fields['Value']);
+ return 'utf8mb4';

Revision history for this message
Robert Lyon (robertl-9) wrote :

or you could try this:

https://stackoverflow.com/questions/35847015/mysql-change-innodb-large-prefix

So that the index length can be longer than 767 characters

Changed in mahara:
status: Incomplete → Won't Fix
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/11631

Changed in mahara:
status: Won't Fix → In Progress
milestone: none → 21.04.0
importance: Undecided → Medium
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/11631
Committed: https://git.mahara.org/mahara/mahara/commit/ec38bea2751a5293c240faa92e549a7c263f5bed
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit ec38bea2751a5293c240faa92e549a7c263f5bed
Author: Robert Lyon <email address hidden>
Date: Tue Apr 6 14:25:23 2021 +1200

Bug 1909116: Needing to bump minimum Mysql version

Because of short indexes and utf8mb4 character incoding

Change-Id: Icd0b9204246e2e35342b469b8226df81dbe55d1a
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/11744

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.