peixue-dev/Archive/[一次性]直接执行SQL-2026-02-28.bat

32 lines
995 B
Batchfile
Raw Permalink 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
echo ============================================
echo 执行创建 user_roles 表(使用完整路径)
echo ============================================
echo.
REM 使用完整路径执行SQL
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe" -h 115.190.64.57 -P 3306 -u root -p123456 peidu < "D:\peixu-main\peixu\Archive\[一次性]创建user_roles表-2026-02-28.sql"
if %errorlevel% neq 0 (
echo.
echo ❌ 执行失败!
echo.
echo 如果提示找不到mysql.exe请修改脚本中的MySQL路径
echo 常见MySQL安装路径
echo C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe
echo C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql.exe
echo C:\xampp\mysql\bin\mysql.exe
echo C:\wamp64\bin\mysql\mysql8.0.x\bin\mysql.exe
echo.
pause
exit /b 1
)
echo.
echo ============================================
echo ✅ 执行成功!
echo ============================================
echo.
pause