Files
CN_Tool_client/build/extraResources/mysql/stop.bat
2026-04-13 17:32:58 +08:00

31 lines
730 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
color 0C
title CN_Tool MySQL Stop
cls
echo ==========================================
echo CN_Tool MySQL 停止工具
echo ==========================================
echo.
set mypath=%cd%
echo 正在停止MySQL服务...
echo.
REM 方法1: 尝试使用mysqladmin关闭
echo [1/1] 尝试按当前目录配置优雅关闭 MySQL...
%mypath%\bin\mysqladmin.exe --defaults-file="%mypath%\my.ini" -u root shutdown 2>nul
if "%ERRORLEVEL%"=="0" (
echo MySQL 已停止
) else (
echo 未能按当前目录配置关闭 MySQL请通过主应用退出流程清理
)
echo.
echo ==========================================
echo MySQL已停止
echo ==========================================
echo.
pause