Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 402
user1441141 Avatar asked Feb 03 '26 07:02

user1441141


2 Answers

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.

like image 79
Bob Arnson Avatar answered Feb 04 '26 19:02

Bob Arnson


  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 !!!

like image 38
Up_One Avatar answered Feb 04 '26 19:02

Up_One



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!