Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-25532

mysqli: optional dbport is ignored

    XMLWordPrintable

    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

        Attachments

        There are no Sub-Tasks for this issue.

          Activity

            People

            Assignee:
            nebgor Aparup Banerjee
            Reporter:
            somplan Georg Westermann
            Tester:
            Nobody
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              25/Dec/10