Archive: MySQL installation


MySQL installation
Hallo,

I want to make an installation script for MySQL. I use the MySQL noinstall package.
What should I have to do, I read the documtentation, but can't find any info about it.

Kind Regards
Tulp


You should read MySQL's documentation which should explain what goes where. Then, if you have any specific questions about certain steps in the installation which you can't figure out how to perform in NSIS, ask.


Starting MySQL
I'm also having problems installing MySQL. Actually, more like starting mysql during the install.
I downloaded the mysql binaries without installer from the website. By command line the following works fine.

mysqld-nt.exe --install --defaults-file="<path to my.ini>"
net start mysql

I tried
ExecWait "mysqld-nt.exe --install --defaults-file=$\"<path to my.ini>$\""
ExecWait "net start mysql"
and
ExecWait "$SYSDIR\net.exe start mysql"
but neither work.
If I run
net start mysql
by cmd after the install it starts fine.
I also tried nsSCM
nsSCM::Install /NOUNLOAD "MySQL" "MySQL" 16 2 \
"$INSTDIR\mysql\bin\mysqld-nt.exe --defaults-file=$INSTDIR\mysql\my.ini MySQL" "" "" "" ""
Pop $0 ; return error/success

which works then
nsSCM::Start /NOUNLOAD "MySQL"
Pop $0 ; return error/success
MessageBox MB_OK "start mysql is $0"
which returns success but the service is not actually running.
I also tried to query the service using
nsSCM::QueryStatus "MySQL"
Pop $0
Pop $1
MessageBox MB_OK "mysql status is 0 is $0 1 is $1"
which says $1 is 1. If I comment out the Start line, $1 is -55xxx so it THINKS it's running.

Any suggestions anyone?

ExecWait probably doesn't find mysqld.nt.exe. Specify a full path with ExecWait.

ExecWait '"$INSTDIR\mysqld-nt.exe" --install --def...'
And then start it with nsSCM or any other method.