During install, when creating the admin account, the user object has a null mnet_host_id (because $CFG->mnet_localhost_id is null). MySQL refuses to insert the user row into the user table, as mnet_host_id is a NOT
NULL field. I've attached the file adminlib.php.patch. It initializes a mnet_environment object so that $CFG->mnet_localhost_id gets set.