My problem is not that I can't do install it, its that I'm getting different results depending on target machine (variables such as FireWall/security software I believe are not a factor).
Here is my script to start and configure MySQL:
# Start MySQLCan someone tell me if they see something glaringly wrong? I've noticed that I can not use Exec or NsExec to start mysqld since it just hangs waiting which seems wrong based on the doc (I would assume it should fork a child process and continue).
DetailPrint "Starting MySQL Configuration..."
ExecCmd::exec /NOUNLOAD /ASYNC `"$INSTDIR\mysql-5.0.20a-win32\bin\mysqld-nt.exe"`
Pop $0 ; return value
DetailPrint "Starting MySQL Daemon returned $0"
${If} $0 != "error"
# Load it
DetailPrint "Loading schema..."
ExpandEnvStrings $0 "%COMSPEC%"
NsExec::exec `"$0" /C $INSTDIR\mysql-5.0.20a-win32\bin\mysql.exe -u root < $INSTDIR\mysql-5.0.20a-win32\my_ddl.sql`
Pop $0 ; return value
DetailPrint "Schema loading returned $0"
StrCmp $0 "0" 0 DatabaseSchemaFail
DetailPrint "Schema load successful!"
${Else}
DatabaseSchemaFail:
MessageBox MB_OK "Install failed to load database schema. Please see documentation on how to load schema file manually!"
${EndIf}
When it fails, it seems that the schema load fails, i.e. mysql starts but then the schema instantly fails. Occasionally on some boxes when this occurs the mysqld process dies as well. On my machine it works everytime, on other machines it fails miserably.
Does anyone know what's going on or have seen this type of behavior before?
Thanks!