summaryrefslogtreecommitdiffstats
path: root/lib/private/Setup/MySQL.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Setup/MySQL.php')
-rw-r--r--lib/private/Setup/MySQL.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/Setup/MySQL.php b/lib/private/Setup/MySQL.php
index 1467eb734d7..1ff7b278b86 100644
--- a/lib/private/Setup/MySQL.php
+++ b/lib/private/Setup/MySQL.php
@@ -100,8 +100,14 @@ class MySQL extends AbstractDatabase {
'tablePrefix' => $this->tablePrefix,
);
- // adding port support
- if (strpos($this->dbHost, ':')) {
+ // adding port support through installer
+ if(!empty($this->dbPort)) {
+ if (ctype_digit($this->dbPort)) {
+ $connectionParams['port'] = $this->dbPort;
+ } else {
+ $connectionParams['unix_socket'] = $this->dbPort;
+ }
+ } else if (strpos($this->dbHost, ':')) {
// Host variable may carry a port or socket.
list($host, $portOrSocket) = explode(':', $this->dbHost, 2);
if (ctype_digit($portOrSocket)) {