Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i want to silently install MySQL 5.0 in NSI. I tried the following code in NSI:

  ExecWait 'msiexec /i "$INSTDIR\mysql-essential-5.0.27-win32.msi" /qn'
  ExecWait "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqlinstanceconfig.exe -i -q ServiceName=MySQL RootPassword=root ServerType=DEVELOPMENT    DatabaseType=MYISAM Port=3306 RootCurrentPassword=root"

This installs the MySQL but doesn't cofigure it.

I want to configure it with

  • pass=root
  • port=3306
  • servicename=Mysql
  • and enable root access from remote machine

EDIT1

now its getting configured...

for serverhost as localhost or 127.0.0.1 it works, but not for the ip addreses of the other systems .which are on network..

If i try to access the database on silently installed database from pc on network i get the following error

: http://i.stack.imgur.com/OVoU4.png

I think this is because i need to pass some parameter for and enabling root access from remote machine..

share|improve this question
add comment

2 Answers

up vote 0 down vote accepted

Try quoting the mysqlinstanceconfig.exe filename, like this:

ExecWait 'msiexec /i "$INSTDIR\mysql-essential-5.0.27-win32.msi" /qn'
ExecWait "$\"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqlinstanceconfig.exe$\" -i -q ServiceName=MySQL RootPassword=root ServerType=DEVELOPMENT    DatabaseType=MYISAM Port=3306 RootCurrentPassword=root"

The reason for this is that you have spaces in the path to the executable name. That path must be surrounded with quotes so it can form a single path.

share|improve this answer
    
it still not getting configured...:(.. is the configuring code correct? –  pradnya Apr 18 '12 at 12:23
    
I have only ran the two commands you specified, and MySQL Query browser is working for me. It can connect locally to the database. –  Ove Apr 18 '12 at 13:07
    
i want to connect it remotely.. how to do that.. i have edited my question.. –  pradnya Apr 18 '12 at 13:10
    
Try adding SkipNetworking=no in the commandline for mysqlinstanceconfig. You can see all the parameters here –  Ove Apr 18 '12 at 13:12
    
do i have to add SkipNetworking=no at end of Execwait line ? ExecWait "$\"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqlinstanceconfig.exe$\" -i -q ServiceName=MySQL RootPassword=root ServerType=DEVELOPMENT DatabaseType=MYISAM Port=3306 RootCurrentPassword=root SkipNetworking=no" then not working..( –  pradnya Apr 18 '12 at 13:24
show 2 more comments

The whole command passed to ExecWait should be enclosed in '' if it contains spaces.

The parameters inside your parameters, need to be enclosed in "" if they contain spaces. You can see a perfect example of how to do it correctly in your first call to ExecWait.

Note, if the command could have spaces, you should put it in quotes to delimit it from parameters. e.g.: ExecWait '"$INSTDIR\command.exe" parameters'.

Source: Documentation

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.