Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0
-
Fix Version/s: 2.0.1
-
Component/s: Database SQL/XMLDB
-
Labels:
-
Environment:mysql 5.0 running on alternative port 3307
-
Database:MySQL
-
Difficulty:Easy
-
Affected Branches:MOODLE_20_STABLE
-
Fixed Branches:MOODLE_20_STABLE
Description
To run mysql under different port than default port 3306 we have the dboptions-array in config.php.
But dboptions['dbport'] is ignored when creating the mysqli connection.
I changed line 265 in lib/dml/mysqli_native_moodle_database.php
from
$this->mysqli = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
to
$this->mysqli = new mysqli($dbhost, $dbuser, $dbpass, $dbname, $dboptions['dbport']);
to solve this problem