admin/fix_database.bat

41 lines
1.1 KiB
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
echo ========================================
echo 修复数据库组件路径
echo ========================================
echo.
echo 此脚本将执行 SQL 修复,解决菜单显示问题
echo.
echo 请确保:
echo 1. MySQL 服务正在运行
echo 2. 数据库连接信息正确localhost:3306, root/root
echo.
pause
mysql -h localhost -P 3306 -u root -proot soybean_admin < EXECUTE_THIS_FIX.sql
if %errorlevel% equ 0 (
echo.
echo ========================================
echo 修复成功!
echo ========================================
echo.
echo 接下来请:
echo 1. 重启后端服务backend/start.bat
echo 2. 刷新浏览器Ctrl+Shift+R 强制刷新)
echo 3. 重新登录测试
echo.
) else (
echo.
echo ========================================
echo 修复失败!
echo ========================================
echo.
echo 请检查:
echo 1. MySQL 是否正在运行
echo 2. 数据库连接信息是否正确
echo 3. 是否有足够的权限
echo.
)
pause