diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-03-05 11:01:25 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-05 11:01:25 +0300 |
commit | 8c92c4aad15964e12832709a61f65787a98247d7 (patch) | |
tree | 841a307911b98ad8a1cebcb5ca0c4c3f06e1e260 /core | |
parent | 09eedc37854169a2df205ba99a31b69e51881ee3 (diff) | |
parent | 75b9cb2970d37247f1f2916ac8856ffa881fc265 (diff) |
Merge pull request #19327 from nextcloud/backport/19303/stable17
[stable17] Fix occ maintenance:install database connect failure
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/Maintenance/Install.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/Command/Maintenance/Install.php b/core/Command/Maintenance/Install.php index 39692e036ba..f5b85b4c3a7 100644 --- a/core/Command/Maintenance/Install.php +++ b/core/Command/Maintenance/Install.php @@ -132,6 +132,10 @@ class Install extends Command { } else { $dbHost = $input->getOption('database-host'); } + if ($dbPort) { + // Append the port to the host so it is the same as in the config (there is no dbport config) + $dbHost .= ':' . $dbPort; + } $dbTablePrefix = 'oc_'; if ($input->hasParameterOption('--database-table-prefix')) { $dbTablePrefix = (string) $input->getOption('database-table-prefix'); @@ -181,7 +185,6 @@ class Install extends Command { 'dbpass' => $dbPass, 'dbname' => $dbName, 'dbhost' => $dbHost, - 'dbport' => $dbPort, 'dbtableprefix' => $dbTablePrefix, 'adminlogin' => $adminLogin, 'adminpass' => $adminPassword, |