From 57eb617b1e1f437870baee5dc2b2a05a3151d92d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 20 Sep 2022 08:39:25 +0200 Subject: [PATCH] Do not store generated mysql password if it was not used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Setup/MySQL.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/private/Setup/MySQL.php b/lib/private/Setup/MySQL.php index e3004c269bc35..caa73edccec3d 100644 --- a/lib/private/Setup/MySQL.php +++ b/lib/private/Setup/MySQL.php @@ -183,6 +183,9 @@ private function createSpecificUser($username, $connection): void { $i++; } } + } else { + // Reuse existing password if a database config is already present + $this->dbPassword = $rootPassword; } } catch (\Exception $ex) { $this->logger->info('Can not create a new MySQL user, will continue with the provided user.', [