From 563596bc69ed2feabf76bf5377acf5159f951604 Mon Sep 17 00:00:00 2001 From: Yehonal Date: Mon, 17 Oct 2022 15:46:56 +0000 Subject: [PATCH] fix(CORE): revert to mysql -p argument. A different and non deprecated approach should be used. --- src/server/database/Updater/DBUpdater.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp index e1a1518f1..f5d8f65a3 100644 --- a/src/server/database/Updater/DBUpdater.cpp +++ b/src/server/database/Updater/DBUpdater.cpp @@ -447,6 +447,9 @@ void DBUpdater::ApplyFile(DatabaseWorkerPool& pool, std::string const& hos args.emplace_back("-h" + host); args.emplace_back("-u" + user); + if (!password.empty()) + args.emplace_back("-p" + password); + // Check if we want to connect through ip or socket (Unix only) #ifdef _WIN32 @@ -498,8 +501,6 @@ void DBUpdater::ApplyFile(DatabaseWorkerPool& pool, std::string const& hos auto env = boost::process::environment(); - if (!password.empty()) - env["MYSQL_PWD"]=password; // Invokes a mysql process which doesn't leak credentials to logs int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args,