Do not store generated mysql password if it was not used

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2022-09-20 08:39:25 +02:00
parent 3ac720aaca
commit b427ccd065
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 3 additions and 0 deletions

View File

@ -183,6 +183,9 @@ class MySQL extends AbstractDatabase {
$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.', [