【修改】取消关闭

This commit is contained in:
huababa1
2025-08-25 19:02:18 +08:00
parent f21c7d4752
commit e594e4d854

View File

@@ -509,17 +509,16 @@ class Program
} }
} }
// 关闭临时 MySQL只关掉端口 48086 // 关闭临时 MySQL只关掉端口 48086
if (proc.ProcessName.Equals("mysqld", StringComparison.OrdinalIgnoreCase)) // if (proc.ProcessName.Equals("mysqld", StringComparison.OrdinalIgnoreCase))
{ // {
string cmdLine = GetCommandLine(proc); // string cmdLine = GetCommandLine(proc);
if (!string.IsNullOrEmpty(cmdLine) && cmdLine.Contains("--port=48086")) // if (!string.IsNullOrEmpty(cmdLine) && cmdLine.Contains("--port=48086"))
{ // {
Console.WriteLine($"Closing temporary MySQL (PID: {proc.Id}) on port 48086"); // Console.WriteLine($"Closing temporary MySQL (PID: {proc.Id}) on port 48086");
proc.Kill(); // proc.Kill();
} // }
} // }
} }
catch catch
{ {