MySQL Forums
Forum List  »  Install & Repo

Re: MySQL Silent Install
Posted by: Jay Alverson
Date: February 12, 2009 08:12AM

Quote

Jim Manico Wrote:
-------------------------------------------------------
> David, I'm exactly where you are at now - what is
> your solution?
>
> My second ExecWait (with the --init-file) hangs
> forever (but the SQL executes)
> I think --init-file actually runs the server - I
> wonder how you setup the service to run the sql at
> startup... ?
>

If you mean install the service so that it starts automatically I've done
it with .bat & .vbs files and v5.0.67 and v6.0.9

using mysqlinstanceconfig.exe with command line options will install and start the service automatically.

echo off
cls
echo Starting Install...

set mysql_msi="C:\Program Files\Jay\ZZDownloads\mysql-essential-6.0.7-alpha-win32.msi"
set mysql_svname=MySQL
set mysql_odbc="C:\Program Files\Jay\ZZDownloads\mysql-connector-odbc-5.1.5-win32.msi"
set mysql_gui="C:\Program Files\Jay\ZZDownloads\mysql-gui-tools-5.0-r12-win32.msi"
set mysql_datadir="C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 6.0\data"
set mysql_data2="C:\Program Files\MySQL\MySQL Server 6.0\data"
set mysql_cmd="GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mysql' WITH GRANT OPTION;"

msiexec /i %mysql_msi% /qn INSTALLDIR="C:\Program Files\MySQL\MySQL Server 6.0\" /L* C:\MSI-MySQL-Log.txt
echo MySQL Version 6.0.7 installed...
rem md %mysql_data2%

"C:\Program Files\MySQL\MySQL Server 6.0\bin\mysqlinstanceconfig.exe" -i -q ServiceName=MySQL RootPassword=mysql ServerType=DEVELOPMENT DatabaseType=MYISAM Port=3306 RootCurrentPassword=mysql
echo MySQL Instance Configured...Service started...

rem Uncomment next line to allow root access from any pc...
"C:\Program Files\MySQL\MySQL Server 6.0\bin\mysql.exe" -uroot -pmysql -e %mysql_cmd%

msiexec /qn /i %mysql_odbc% /L* C:\MSI-MySQL-ODBC-Log.txt
echo ODBC Connector installed...

msiexec /qn /i %mysql_gui% /L* C:\MSI-MySQL-GUI-Log.txt
echo MySQL GUI Tools installed...

echo on

explorer "C:\Program Files\MySQL\MySQL Server 6.0\bin"

see also: http://svn.mysql.com/svnpublic/mysql-instance-config/trunk/readme.txt

>

Thanks, Jay

Options: ReplyQuote


Subject
Written By
Posted
March 12, 2007 02:20PM
February 12, 2009 05:45AM
Re: MySQL Silent Install
February 12, 2009 08:12AM
September 10, 2008 07:55PM
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.