Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

fix(install) Get the ip address of an existing connection to set the permission correctly #7347

Merged
merged 4 commits into from
Apr 3, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion www/install/steps/process/createDbUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
$host = "localhost";
// if database server is not on localhost...
if ($parameters['address'] != "127.0.0.1" && $parameters['address'] != "localhost") {
$host = $_SERVER['SERVER_ADDR'];
$host = explode(" ", $link->getAttribute(PDO::ATTR_CONNECTION_STATUS))[0];
lgcosta marked this conversation as resolved.
Show resolved Hide resolved
}
$query = "GRANT ALL PRIVILEGES ON `%s`.* TO `" . $dbUser . "`@`" . $host .
"` IDENTIFIED BY '" . $dbPass . "' WITH GRANT OPTION";
Expand Down