MSI packages for Mariadb are available starting with version 5.2.6. The packages are available for both x86 (32 bit) and x64 (64 bit) processor architectures. We'll use screenshots from an x64 installation below (the 32 bit installer is very similar).
Important: Compatibility with NSIS installers for 5.2.5 or earlier.
If you install the MSI package for MariaDB 5.2 on a machine where 5.2.5 or earlier is installed, the MSI package will fail and tell you to uninstall the older 5.2 version. This behavior is by design. You can proceed by uninstalling 5.2.x without worries. Existing databases will not be removed.
This is the typical mode of installation. To start the installer, just click on the mariadb-<major>.<minor>.<patch>.msi
Click on "I accept the terms"
Here, you can choose what features to install. By default, all features are installed with the exception of the debug symbols. If the "Database instance" feature is selected, the installer will create a database instance, by default running as a service. In this case the installer will present additional dialogs to control various database properties. Note that you do not necessarily have to create an instance at this stage. For example, if you already have MySQL or MariaDB databases running as services, you can just upgrade them during the installation. Also, you can create additional database instances after the installation, with the mysql_install_db.exe
utility.
NOTE: By default, if you install a database instance, the data directory will be in the "data" folder under the installation root. To change the data directory location, select "Database instance" in the feature tree, and use the "Browse" button to point to another place.
This dialog is shown if you selected the "Database instance" feature. Here, you can set the password for the "root" database user and specify whether root can access database from remote machines. The "Create anonymous account" setting allows for anonymous (non-authenticated) users. It is off by default and it is not recommended to change this setting.
--install
and --install-manual
options for mysqld.exe
is "MySQL" in all versions of MariaDB. sql_mode
parameter is set to "NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
". You can also define the Innodb/Xtradb buffer pool size. The default buffer pool size is 12.5% of RAM and depending on your requirements you can give innodb more (up to 70-80% RAM). 32 bit versions of MariaDB have restrictions on maximum buffer pool size, which is approximately 1GB, due to virtual address space limitations for 32bit processes. At this point, all installation settings are collected. Click on the "Install" button.
If user account control is enabled (Vista or later), you will see this dialog. Click on "Yes".
Installation is finished now. If you have upgradable instances of MariaDB/MySQL, running as services, this dialog will present a "Do you want to upgrade existing instances" checkbox (if selected, it launches the Upgrade Wizard post-installation).
If you installed a database instance as service, the service will be running already.
Installation will add some entries in the Start Menu:
In the Explorer applet "Programs and Features" (or "Add/Remove programs" on older Windows), find the entry for MariaDB, choose Uninstall/Change and click on the "Remove" button in the dialog below.
If you installed a database instance, you will need to decide if you want to remove or keep the data in the database directory.
The MSI installer supports silent installations as well. In its simplest form silent installation with all defaults can be performed from an elevated command prompt like this:
msiexec /i path-to-package.msi /qn
Note: the installation is silent due to msiexe.exe's /qn switch (no user interface), if you omit the switch, the installation will have the full UI.
Silent installations also support installation properties (a property would correspond for example to checked/unchecked state of a checkbox in the UI, user password, etc). With properties the command line to install the MSI package would look like this:
msiexec /i path-to-package.msi [PROPERTY_1=VALUE_1 ... PROPERTY_N=VALUE_N] /qn
The MSI installer package requires property names to be all capitals and contain only English letters. By convention, for a boolean property, an empty value means "false" and a non-empty is "true".
MariaDB installation supports the following properties:
Property name | Default value | Description |
---|---|---|
INSTALLDIR | %ProgramFiles%\MariaDB <version>\ | Installation root |
PORT | 3306 | --port parameter for the server |
ALLOWREMOTEROOTACCESS | Allow remote access for root user | |
BUFFERPOOLSIZE | RAM/8 | Bufferpoolsize for innodb |
CLEANUPDATA | 1 | Remove the data directory (uninstall only) |
DATADIR | INSTALLDIR\data | Location of the data directory |
DEFAULTUSER | Allow anonymous users | |
PASSWORD | Password of the root user | |
SERVICENAME | Name of the Windows service. A service is not created if this value is empty. | |
SKIPNETWORKING | Skip networking | |
STDCONFIG | 1 | Corresponds to "optimize for transactions" in the GUI, default engine innodb, strict sql mode |
UTF8 | if set, adds character-set-server=utf8 to my.ini file (added in MariaDB 5.5.29) | |
PAGESIZE | 16K | page size for innodb |
Feature is a Windows installer term for a unit of installation. Features can be selected and deselected in the UI in the feature tree in the "Custom Setup" dialog.
Silent installation supports adding features with the special property ADDLOCAL=Feature_1,..,Feature_N
and removing features with REMOVE=Feature_1,..., Feature_N
Features in the MariaDB installer:
Feature id | Installed by default? | Description |
---|---|---|
DBInstance | yes | Install database instance |
Client | yes | Command line client programs |
MYSQLSERVER | yes | Install server |
SharedLibraries | yes | Install client shared library |
DEVEL | yes | install C/C++ header files and client libraries |
HeidiSQL | yes | Installs HeidiSQL |
DEBUGSYMBOLS | no | install debug symbols |
All examples here require running as administrator (and elevated command line in Vista and later)
msiexec /i path-to-package.msi SERVICENAME=MySQL DATADIR=C:\mariadb5.2\data PORT=3307 /qn
msiexec /i path-to-package.msi SERVICENAME=MySQL ADDLOCAL=DEBUGSYMBOLS REMOVE=DEVEL /qn
To uninstall silently, use the REMOVE=ALL
property with msiexec:
msiexec /i path-to-package.msi REMOVE=ALL /qn
To keep the data directory during an uninstall, you will need to pass an additional parameter:
msiexec /i path-to-package.msi REMOVE=ALL CLEANUPDATA="" /qn
If you encounter a bug in the installer, the installer logs should be used for diagnosis. Please attach verbose logs to the bug reports you create. To create a verbose installer log, start the installer from the command line with the /l*v
switch, like so:
msiexec.exe /i path-to-package.msi /l*v path-to-logfile.txt
It is possible to install 32 and 64 bit packages on the same Windows x64.
Apart from testing, an example where this feature can be useful is a development scenario, where users want to run a 64 bit server and develop both 32 and 64 bit client components. In this case the full 64 bit package can be installed, including a database instance plus development-related features (headers and libraries) from the 32 bit package.
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/installing-mariadb-msi-packages-on-windows/