I managed to turn debugging on in config.php
Specifically:
//=========================================================================
// 7. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!
//=========================================================================
//
// Force a debugging mode regardless the settings in the site administration
@error_reporting(E_ALL | E_STRICT); // NOT FOR PRODUCTION SERVERS!
@ini_set('display_errors', '1'); // NOT FOR PRODUCTION SERVERS!
$CFG->debug = (E_ALL | E_STRICT); // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS!
$CFG->debugdisplay = 1; // NOT FOR PRODUCTION SERVERS!
This revealed the error was by a bug in the Moodle code. MySQL (5.7) updated a variable name which broke the reference in Moodle.
Check out
https://tracker.moodle.org/browse/MDL-50633
You can fix the problem temporarily by updating core to use the correct variable name.
lib/dml/mysqli_native_moodle_database.php
`
change this
```
// get the default database engine
$sql = "SELECT @@storage_engine";
$this->query_start($sql, NULL, SQL_QUERY_AUX);
$result = $this->mysqli->query($sql);
$this->query_end($result);
if ($rec = $result->fetch_assoc()) {
$engine = $rec['@@storage_engine'];
}
$result->close();
```
to this
```
// get the default database engine
$sql = "SELECT @@default_storage_engine";
$this->query_start($sql, NULL, SQL_QUERY_AUX);
$result = $this->mysqli->query($sql);
$this->query_end($result);
if ($rec = $result->fetch_assoc()) {
$engine = $rec['@@default_storage_engine'];
}
$result->close();
Hope that helps. I have wasted enough time on this...