MySQL Forums
Forum List  »  Install & Repo

Re: MySQL Silent Install
Posted by: Jim Manico
Date: February 12, 2009 03:48PM

This was good - but not perfect advice! :)

To get this to work, I had to go through a few other hoops which I documented below.

Section "MySQL Installation" SEC00921
#!if ${MYSQL}

#copy ini file from a safe source - sometimes it gets deleted during previous uninstalls
${CopyFiles} "d:\my-copy.ini" "c:\data\my.ini"

#install mysql
ExecWait 'msiexec /i "${P4}\archive\software\mysql\installer\5.0.27-win32\mysql-essential-5.0.27-win32.msi" /quiet INSTALLDIR="C:\Program Files\MySQL\MySQL Server 5.0"'

#delete default database files and log entries - this was key
Delete "C:\Program Files\MySQL\MySQL Server 5.0\data\ib_logfile0"
Delete "C:\Program Files\MySQL\MySQL Server 5.0\data\ib_logfile1"
Delete "C:\Program Files\MySQL\MySQL Server 5.0\data\ibdata1"

#install the service with a ini file I stole from another xp machine
ExecWait '"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt.exe" --install MySQL --defaults-file="c:\data\my.ini"'

#start the service
ExecWait 'net start MySQL'

#set up default users and data
DetailPrint "Creating ARMS database"
ExecWait '"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe" --user=root --execute="CREATE DATABASE MYWEBDB;"'
ExecWait '"C:\Program Files\MySQL\MySQL Server 5.0\bin\mysql.exe" --user=root --execute="GRANT ALL PRIVILEGES ON *.* TO $\'webuser$\'@$\'localhost$\' IDENTIFIED BY $\'webuser$\' WITH GRANT OPTION;"'

#!endif
SectionEnd

Options: ReplyQuote


Subject
Written By
Posted
March 12, 2007 02:20PM
February 12, 2009 05:45AM
February 12, 2009 08:12AM
September 10, 2008 07:55PM
Re: MySQL Silent Install
February 12, 2009 03:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.