Installing MariaDB MSI Packages on Windows
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.
- Installation UI
- License Agreement
- Custom Setup
- Database authentication/security related properties
- Other database properties
- Ready to Install
- User account control (UAC) popup
- New entries in Start Menu
- Uninstall UI
- Silent installation
- Installation logs
- Running 32 and 64 bit distributions on the same machine.
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
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.
Database authentication/security related properties
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.
Other database properties
- Install as service
- Defines if the database should be run as a service and the service name.
It is recommended to run your database instance as a service as it greatly
simplifies database management. The default service name is "MySQL", for
compatibility reasons (this is the same name that
mysqld.exe --install" would choose too).
- Enable networking
- Whether to enable TCP/IP (recommended) and which port MariaDB should listen to. If security is a concern, you can change the bind-address parameter post-installation to bind to only local addresses. If the "Enable networking" checkbox is deselected, the database will use named pipes for communication.
- Optimize for transactions
- If this checkbox is selected, the default storage engine is set to Innodb
(or XtraDB) and the
sql_modeparameter 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.
Ready to Install
At this point, all installation settings are collected. Click on the "Install" button.
User account control (UAC) popup
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.
New entries in Start Menu
Installation will add some entries in the Start Menu:
- MySQL Client - Starts command line client mysql.exe
- Command Prompt - Starts a command prompt. Environment is set such that "bin" directory of the installation is included into PATH environment variable, i.e you can use this command prompt to issue MariaDB commands (mysqldadmin, mysql etc...)
- Database directory - Opens the data directory in Explorer.
- Error log - Opens the database error log in Notepad.
- my.ini - Opens the database configuration file my.ini in Notepad.
- Upgrade Wizard - Starts the Wizard to upgrade an existing MariaDB/MySQL database instance to this MariaDB version.
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 requies 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 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.|
|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)|
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
Features in the MariaDB installer:
|Feature id||Installed by default?||Description|
|DBInstance||yes||Install database instance|
|Client||yes||Command line client programs|
|DebugBinaries||yes||Install mysqld-debug, and debug versions of client libraries|
|SharedLibraries||yes||Install client shared library|
|DEVEL||yes||install C/C++ header files and client libraries|
|Embedded||no||embedded server library|
|DEBUGSYMBOLS||no||install debug symbols|
Silent installation examples
All examples here require running as administrator (and elevated command line in Vista and later)
- Install default features, database instance as service, non-default datadir
msiexec /i path-to-package.msi SERVICENAME=MySQL DATADIR=C:\mariadb5.2\data PORT=3307 /qn
- Install service, add debug symbols, do not add development components (client
libraries and headers)
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 logs to the bug reports you create. To create an
installer log, start the installer from the command line with the
switch, like so:
msiexec.exe /i path-to-package.msi /l path-to-logfile.txt
Running 32 and 64 bit distributions on the same machine.
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.