[All]修改MYSQL連線字串的條件,改善重開機後需要手動連DB才能運行的問題

This commit is contained in:
張家睿 2024-04-10 09:23:27 +08:00
parent 5365ab66c0
commit bdb9ffe9de

View File

@ -66,7 +66,7 @@ namespace Repository.Helper
//var databaseStr = ed.AESEncrypt("bims_mitsubishi"); // bims_wsp: IgYBsgG2VLKKxFb64j7LOA== ; bims_mitsubishi
//var rootStr = ed.AESEncrypt("bims"); // bims
//var passwordStr = ed.AESEncrypt("mjmdev_BIMS2022"); // mjmdev_BIMS2022
var connStr = $"server={serverStr};port={portStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;Allow User Variables=True;SslMode=None;";
var connStr = $"server={serverStr};port={portStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;Allow User Variables=True;SslMode=Required;"; // 2024.04.09 SSLmode改成Required改善重開機無法自動連上MYSQL的問題
//var conn = new MySqlConnection(connStr);
return connStr;