diff --git a/workflow/engine/controllers/newSiteProxy.php b/workflow/engine/controllers/newSiteProxy.php index 972b58c01..41428e916 100644 --- a/workflow/engine/controllers/newSiteProxy.php +++ b/workflow/engine/controllers/newSiteProxy.php @@ -44,8 +44,8 @@ class newSiteProxy extends HttpProxyController //$json = new Services_JSON(); //G::pr($result['result']['database']);G::pr($action); $dbWf = $result['result']['database']['ao']['ao_db_wf']['status']; - $dbRb = $result['result']['database']['ao']['ao_db_rb']['status']; - $dbRp = $result['result']['database']['ao']['ao_db_rp']['status']; + $dbRb = isset($result['result']['database']['ao']['ao_db_rb']['status']) ? $result['result']['database']['ao']['ao_db_rb']['status'] : null; + $dbRp = isset($result['result']['database']['ao']['ao_db_rp']['status']) ? $result['result']['database']['ao']['ao_db_rp']['status'] : null; $wsAction = ($action != '') ? 1 : 0; if ($dbWf && $action) { $this->success = true; diff --git a/workflow/engine/src/ProcessMaker/Core/Installer.php b/workflow/engine/src/ProcessMaker/Core/Installer.php index e93baa821..3bd3fa8a3 100644 --- a/workflow/engine/src/ProcessMaker/Core/Installer.php +++ b/workflow/engine/src/ProcessMaker/Core/Installer.php @@ -172,7 +172,10 @@ class Installer if ($this->cc_status == 1) { $host = ($islocal) ? "localhost" : "%"; - $this->run_query("GRANT ALL PRIVILEGES ON `$wf`.* TO {$this->wf_user_db}@'$host' IDENTIFIED BY '{$this->options['password']}' WITH GRANT OPTION", "Grant privileges for user {$this->wf_user_db} on database $wf", self::CONNECTION_TEST_INSTALL); + $query = "CREATE USER '{$this->wf_user_db}'@'$host' IDENTIFIED WITH mysql_native_password BY '{$this->options['password']}'"; + $this->run_query($query, "Create user {$this->wf_user_db} for database $wf", self::CONNECTION_TEST_INSTALL); + $query = "GRANT ALL PRIVILEGES ON `$wf`.* TO '{$this->wf_user_db}'@'$host' WITH GRANT OPTION"; + $this->run_query($query, "Grant privileges for user {$this->wf_user_db} on database $wf", self::CONNECTION_TEST_INSTALL); } @@ -810,7 +813,11 @@ class Installer $rt['message'] = 'Successful connection'; } else { $usrTest = 'wfrbtest'; - $chkG = "GRANT ALL PRIVILEGES ON `" . $dbNameTest . "`.* TO " . $usrTest . "@'%' IDENTIFIED BY '!Sample123' WITH GRANT OPTION"; + + $chkG = "CREATE USER '$usrTest'@'%' IDENTIFIED WITH mysql_native_password BY '!Sample123'"; + DB::connection($nameConnection) + ->statement($chkG); + $chkG = "GRANT ALL PRIVILEGES ON `$dbNameTest`.* TO '$usrTest'@'%' WITH GRANT OPTION"; $ch = DB::connection($nameConnection) ->statement($chkG);