Installing MariaDB on Windows and Mac OS X

(For more resources related to this topic, see here.)

Installing MariaDB on Windows

There are two types of MariaDB downloads for Windows: ZIP files and MSI packages. As mentioned previously, the ZIP files are similar to the Linux binary .tar.gz files and they are only recommended for experts who know they want it. If we are starting out with MariaDB on Windows, it is recommended to use the MSI packages. Here are the steps to do just that:

  1. Download the MSI package from First click on the series we want (stable, most likely), then locate the Windows 64-bit or Windows 32-bit MSI package. For most computers, the 64-bit MSI package is probably the one that we want, especially if we have more than 4 Gigabytes of RAM. If you're unsure, the 32-bit package will work on both 32-bit and 64-bit computers.
  2. Once the download has finished, launch the MSI installer by double-clicking on it. Depending on our settings we may be prompted to launch it automatically. The installer will walk us through installing MariaDB.

  3. If we are installing MariaDB for the first time, we must be sure to set the root user password when prompted.

  4. Unless we need to, don't enable access from remote machines for the root user or create an anonymous account.

  5. The Install as service box is checked by default, and it's recommended to keep it that way so that MariaDB starts up when the computer is booted. The Service Name textbox has the default value MySQL for compatibility reasons, but we can rename it if we like.
  6. Check the Enable networking option, if you need to access the databases from a different computer. If we don't it's best to uncheck this box. As with the service name, there is a default TCP port number (3306) which you can change if you want to, but it is usually best to stick with the default unless there is a specific reason not to.
  7. The Optimize for transactions checkbox is checked by default. This setting can be left as is.

  8. There are other settings that we can make through the installer. All of them can be changed later by editing the my.ini file, so we don't have to worry about setting them right away.
  9. If our version of Windows has User Account Control enabled, there will be a pop-up during the installation asking if we want to allow the installer to install MariaDB. For obvious reasons, click on Yes.
  10. After the installation completes, there will be a MariaDB folder added to the start menu. Under this will be various links, including one to the MySQL Client.

    If we already have an older version of MariaDB or MySQL running on our machine, we will be prompted to upgrade the data files for the version we are installing, it is highly recommended that we do so.

  11. Eventually we will be presented with a dialog box with an installation complete message and a Finish button. If you got this far, congratulations! MariaDB is now installed and running on your Windows-based computer. Click on Finish to quit the installer.

Installing MariaDB on Mac OS X

One of the easiest ways to install MariaDB on Mac OS X is to use Homebrew, which is an Open Source package manager for that platform. Before you can install it, however, you need to prepare your system. The first thing you need to do is install Xcode; Apple's integrated development environment. It's available for free in the Mac App Store.

Once Xcode is installed you can install brew. Full instructions are available on the Brew Project website at but the basic procedure is to open a terminal and run the following command:

ruby -e "$(curl -fsSL"

This command downloads the installer and runs it. Once the initial installation is completed, we run the following command to make sure everything is set up properly:

brew doctor

The output of the doctor command will tell us of any potential issues along with suggestions for how to fix them. Once brew is working properly, you can install MariaDB with the following commands:

brew update brew install mariadb

Unlike on Linux and Windows, brew does not automatically set up or offer to set up MariaDB to start automatically when your system boots or start MariaDB after installation. To do so, we perform the following command:

ln -sfv /usr/local/opt/mariadb/*.plist ~/Library/LaunchAgents launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist

To stop MariaDB, we use the unload command as follows:

launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist


In this article, we learned how to install MariaDB on Windows and Mac OS X.

Resources for Article:

Further resources on this subject:

You've been reading an excerpt of:

Getting Started with MariaDB

Explore Title
comments powered by Disqus