Skip to content

Commit a5b6c04

Browse files
committed
Update genmysql.bat
1 parent 938f93f commit a5b6c04

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

generate/genmysql.bat

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ echo [%date% %time%] Starting MySQL initialization...
2222
echo.
2323

2424
:: Define database versions array
25-
set "DB_VERSIONS=MySQL-5.6 MySQL-5.7 MySQL-8.0 MySQL-8.4"
25+
set "DB_VERSIONS= MySQL-5.7 MySQL-8.0 MySQL-8.4"
2626

2727
:: Process each database version
2828
for %%V in (%DB_VERSIONS%) do (
@@ -60,7 +60,7 @@ set "db_dir=%OSP_ROOT_DIR%\modules\%VERSION%"
6060
set "db_dir_unix=%OSP_ROOT_DIR_UNIX%/modules/%VERSION%"
6161
set "data_dir=%OSP_ROOT_DIR%\modules\%VERSION%\ospanel_data\default_data"
6262
set "db_pipe= --protocol=PIPE --ssl-mode=DISABLED"
63-
if "%VERSION%"=="MySQL-5.6" ( set "db_pipe= --protocol=PIPE" )
63+
6464
echo 📁 Checking if %VERSION% directory exists...
6565
if not exist "%db_dir%" (
6666
echo ❌ ERROR: Directory %db_dir% does not exist!
@@ -207,14 +207,8 @@ set "version=%~1"
207207
set "db_dir=%~2"
208208
set "data_dir=%~3"
209209

210-
if "%version%"=="MySQL-5.6" (
211-
echo 📜 Using Perl script for MySQL 5.6...
212-
perl scripts\mysql_install_db.pl --defaults-file="%db_dir%\my.ini" --basedir="%db_dir%" --datadir="%data_dir%" --skip-name-resolve --windows --verbose
213-
) else (
214-
echo 🔧 Using mysqld initialize for %db_dir%
215-
bin\mysqld.exe --defaults-file="%db_dir%\my.ini" --initialize-insecure --console --standalone
216-
217-
)
210+
echo 🔧 Using mysqld initialize for %db_dir%
211+
bin\mysqld.exe --defaults-file="%db_dir%\my.ini" --initialize-insecure --console --standalone
218212

219213
if !errorlevel! neq 0 (
220214
echo ❌ ERROR: Database initialization failed for %version%

0 commit comments

Comments
 (0)