0

I am using below code to install mysql silently on windows using a batch file..

Seems like it is ignoring /qn

also i have tried with /quiet but that is also not working.

it is just reading line and moving cursor to next line.

echo off
cls

echo Starting MySQL mysql-essential-5.0.88-win32 install
msiexec /i "mysql-essential-5.0.88-win32.msi" /qn INSTALLDIR="C:\Program Files\MySQL" /L* "C:\Program Files\MySQL\mysql-log.txt"
echo MySQL mysql-essential-5.0.88-win32 installed successfully

echo Creating MySQL Windows service
"C:\Program Files\MySQL\bin\mysqlinstanceconfig.exe" -i -q ServiceName="MySQL service" RootPassword="newRootPassword" ServerType=SERVER DatabaseType=MYISAM Port=3306 

RootCurrentPassword=mysql
echo MySQL Instance Configured. Service started.

pause

I have tried directly running command but it is completely ignoring

NOTE: Setup is working fine if i run it directly, issue is with silent installation only

please suggest.

thanks.

Dr. Rajesh Rolen
  • 14,029
  • 41
  • 106
  • 178

2 Answers2

0
/ni
/q
/qn
/quiet
/s
/silent

Try dashes instead of forward slashes too (-S instead of /S), and check both upper case and lower case. Hope that helps.

Du6e
  • 129
  • 1
  • 7
0
@Echo off

FOR /F "tokens=5" %%a in ('netstat -aon ^| find "3306" ^| find "LISTENING"') do taskkill /f /pid %%a
cls
TIMEOUT 1

if "%ProgramFiles(x86)%" == "" (
    set "MySQLServerPath=%ProgramFiles%\MySQL\MySQL Server 5.0\bin"
 ) else (
     set "MySQLServerPath=%ProgramFiles(x86)%\MySQL\MySQL Server 5.0\bin"
 )

REM echo Configurating MySQL Server ...
 "%MySQLServerPath%\MySQLInstanceConfig.exe" -i -q ServerType=DEVELOPER ConnectionUsage=DSS Port=3306 StrictMode=yes Charset=utf8 DatabaseType=MIXED ServiceName=root RootPassword=root
REM echo MySQL has been configured successfully.
omar jayed
  • 850
  • 5
  • 16
jnagendra
  • 1
  • 2