Installing MariaDB MSI packages on Windows
Contents
MSI packages for Mariadb are available starting with 5.2.6. The packages are available for both x86 (32 bit) and x64 (64 bit) processor architectures. We'll use screenshots from x64 installation below, 32 bit would be very similar.
Installation UI
This is the typical mode of installation. To start the installer, just click on mariadb-<major>.<minor>.<patch>.msi
Welcome
License Agreement
Click on "I accept the terms"
Custom Setup
Here, you can choose what features to install. By default, all features are installed with the exception of the debug symbols. If "Database instance" feature is selected, installer will create a database instance, by default running as a service. In this case there installer will present additional dialogs to control various database properties. Note, that you do not necessarily have to create an instance on this stage. For example, if you already had running MySQL or MariaDB databases running as services, you can just upgrade them during the installation. Also, you can create additional database instances post installation, with mysql_install_db.exe utility.
NOTE: By default, if you install database instance, data directory will be in the "data" folder under installation root. To change data directory location, select "Database instance" in the feature tree, and use "Browse" button to point to another place.
Database authentication/security related properties
This dialog is shown if you selected "Database instance" feature. Here, you can define password for the database user "root" and specify whether root can access database from remote machines. "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 database should be run as service, and the service name. It is recommended to run database instance as service, it greately simplifies database management. 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 port MariaDB should listen to. If security is a concern, you can change "bind-address" parameter post-installation to bind to only local addresses. If "Enable networking" checkbox is deselected, database will use named pipe for communication.
- Optimize for transactions
If this checkbox is selected, default storage engine is set to Innodb (or XtraDB) and sql_mode parameter is set to "NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES". You can also define Innodb/Xtradb buffer pool size. Default buffer pool size is 12.5% of RAM, dependent 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 "Install" button.
User account control (UAC) popup
If user account control is enabled (Vista or later), and you will see this dialog. Click on "Yes".
End
Installation is finished now. If you have upgradable instances of MariaDB/MySQL, running as services, this dialog will present "Do you want to upgrade existing instances" checkbox (if selected, it launched Upgrade Wizard post-installation).
In case you installed a database instance as service, 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 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 data directory in Explorer.
- Error log - Opens database error log in Notepad.
- my.ini - Opens database configuration file my.ini in Notepad.
- Upgrade Wizard - Starts Wizard to upgrade an existing MariaDB/MySQL database instance to this MariaDB version.
Uninstall UI
In the Explorer applet "Programs and Features" (or "Add/Remove programs" on older Windows), find entry for MariaDB, choose Uninstall/Change and click on "Remove" button the dialog below.
If you installed database instance, you will need to decide if you want to remove or keep data in the database directory.
Silent installation
MSI supports silent installations as well. In its simplest form silent installation with all defaults can be performed from the elevated command prompt like this: msiexec /i <path-to-package.msi> /qn
Properties
Silent installations also support installation properties (a property would correspond for example to checked/unchecked state of checkbox in UI, user password etc). With properties command line to install MI package would look like this
msiexec /i <path-to-package.msi> [PROPERTY_1=VALUE_1 ... PROPERTY_N=VALUE_N] /qn
MariaDB installation support following properties:
Property name | Default value | Description |
---|---|---|
INSTALLDIR | %ProgramFiles%\MariaDB <version>\ | Installation root |
PORT | 3306 | --port parameter for the server |
ALLOWREMOTEACCESS | Allow remote access for root user | |
BUFFERPOOLSIZE | RAM/8 | Bufferpoolsize for innodb |
CLEANUPDATA | 1 | Remove data directory (uninstall only) |
DATADIR | INSTALLDIR\data | Location of data directory |
DEFAULTUSER | Allow anonymous users | |
PASSWORD | Password of the root user | |
SERVICENAME | Name of the Windows service. Service is not created if value is empty. | |
SKIPNETWORKING | Skip networking | |
STDCONFIG | 1 | Corresponds to "optimize for transactions" in GUI, default engine innodb, strict sql mode |