user1441141
user1441141

Reputation: 606

unattended install (passive) for MySQL CE on Windows

I'm attempting to perform a silent install via a shell command from a migration wizard I am building.

msiexec /i E:\mysql-installer-community-5.6.16.0.msi /passive

While this does initiate the installer, and demands several user interactions due to UAC, it still goes through a normal install.

Is there a way to do a passive install of MySQL CE with "typical" settings from the command line?

Upvotes: 3

Views: 1173

Answers (2)

Bob Arnson
Bob Arnson

Reputation: 21896

That would work if mysql-installer-community-5.6.16.0.msi were a real installer but Oracle made it a "trojan installer." All it does is install other installers and then launch another app that installs them. It appears Oracle made some effort to handle the case of a silent install but requires you to pass in command-line arguments.

After you run the trojan installer, there are GUI and command-line installers in the C:\Program Files\MySQL\MySQL Installer directory. They install the .msi packages from the C:\ProgramData\MySQL\MySQL Installer\Product Cache directory. There's documentation for the GUI and command-line installers.

Upvotes: 2

Up_One
Up_One

Reputation: 5271

  1. Download the no-install zip of MySQL to your desktop.
  2. Open the Zip File in (Window1). You should see the data folder, bin folder, several my.ini files and other files.
  3. Create a Server Folder and a Data Folder in a Desired Location.
    md C:\MySQLSrv
    md C:\MySQLData
  1. Open C:\MySQLSrv in Window Explorer (Window2)

  2. Copy and Paste the Zip Contents into the C:\MySQLSrv (Window2)

  3. Open C:\MySQLSrv\data in Windows Explorer (Window3)

  4. Open C:\MySQLData in Window Explorer (Window4)

  5. Copy and Paste the Contents of C:\MySQLSrv\data (Window3) into C:\MySQLData (Window4)

  6. Close Window3 and Window4

  7. Open a DOS Window and run the following DOS commands

    cd C:\MySQLSrv
    copy my-medium.ini my.ini
    notepad my.ini
    define datadir="C:\\MySQLData"
    cd C:\MySQLSrv\bin
    mysqld --install MySQLNew
    net start MySQLNew

11 . Close all Windows

You should be done !!!

Upvotes: 2

Related Questions