diff options
author | Yehonal <yehonal.azeroth@gmail.com> | 2022-10-17 15:46:56 +0000 |
---|---|---|
committer | Yehonal <yehonal.azeroth@gmail.com> | 2022-10-17 15:47:34 +0000 |
commit | 563596bc69ed2feabf76bf5377acf5159f951604 (patch) | |
tree | f53aa9695537c0c5534501347259c677d488b14d | |
parent | a8d41010f55062459ae260b04b723a448112bd08 (diff) |
fix(CORE): revert to mysql -p argument.
A different and non deprecated approach should be used.
-rw-r--r-- | src/server/database/Updater/DBUpdater.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/database/Updater/DBUpdater.cpp b/src/server/database/Updater/DBUpdater.cpp index e1a1518f14..f5d8f65a3b 100644 --- a/src/server/database/Updater/DBUpdater.cpp +++ b/src/server/database/Updater/DBUpdater.cpp @@ -447,6 +447,9 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& 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<T>::ApplyFile(DatabaseWorkerPool<T>& 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, |