fix: change connction string for mysql

This commit is contained in:
Polianin Nikita 2024-06-01 06:28:13 +03:00
parent d09011d25a
commit 1fd6c8657a

View File

@ -114,11 +114,11 @@ public class SetupController(ISetupToken setupToken, IMaintenanceModeNotConfigur
[BadRequestResponse]
public ActionResult<bool> SetMysql([FromBody] DatabaseRequest request)
{
string connectionString = $"Server={request.Server}:{request.Port};Uid={request.User};Database={request.Database}";
string connectionString = $"Server={request.Server}:{request.Port};Uid={request.User};Database={request.Database};";
if (request.Password != null)
connectionString += $";Pwd={request.Password}";
connectionString += $"Pwd={request.Password};";
if (request.Ssl)
connectionString += ";SslMode=Require;";
connectionString += "SslMode=Require;";
return SetDatabase<MySqlConnection, MySqlException>(connectionString, DbSettings.DatabaseEnum.Mysql);
}