Running Wordpress on MariaDB on Windows

You might have read that the MySQL codebase was forked. The MySQL founder, Monty Widenius, is - how should we say it - not quite happy with the direction MySQL is going after the Oracle acquisition. So Monty and his team forked MySQL and called his branch MariaDB after his youngest daughter.

I wanted to check out MariaDB, running Wordpress with MariaDB on Windows. Not a problem. All I had to do was to trick Web Platform Installer into thinking that MySQL is already installed.

Here step-by-step on how you do it:

MariaDB Installation

  1. MySQL and MariaDB can probably run side-by-side. That would make the installation and configuration more complex however and that's why I'd recommend you simply uninstall MySQL. You can do this by going to the Control Panel and select "Uninstall Programs". Pick MySQL and uninstall it.
  2. Setup of MariaDB is pretty easy although no Windows Installer (.MSI) is available yet. For my install I downloaded the MariaDB version 5.1.39 bits. When you read this you might want to check www.askmonty.org for newer version. Copy the contents of the zip file into a dedicated directory, e.g. c:\mariadb.
  3. Start a command shell (elevate to Administrator on Windows 7 or Vista) and run "mysqld.exe --install". mysqld.exe can be found in the bin directory, e.g. c:\mariadb\bin. This will install MariaDB as a Windows System Service.
  4. Start the MariaDB service by executing the command: net start mysql
    MariaDB is now running.
  5. There is no root password for MariaDB yet and that's why I would recommend you configure one. Later on Web Platform Installer will ask you for the root password you configured here!
    Start mysqladmin with the following arguments:
    mysqladmin.exe -u root password <your supersecure password>
    Like mysqld.exe mysqladmin.exe can be found in the bin directory. Time to get Wordpress installed.

Tricking Web Platform Installer

Web Platform Installer (WebPI) does an extensive dependency check on startup to figure out what products are already installed and which products might still need to install. Because Wordpress depends on MySQL we have to trick WebPI so that it thinks MySQL is aleady installed. If you peak into the WebPI RSS feed you see that it checks for a MySQL install by checking for a reg key
HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB\MySQL Server 5.1
image 
On 64-Bit versions of the OS it also checks for a potential 32-Bit install of MySql against the reg key
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MySQL AB\MySQL Server 5.1
Let's simply set the registry key with the following command: reg add "HKLM\SOFTWARE\MySQL AB\MySQL Server 5.1". Now WebPI will be convinced that MySQL is already installed.

Installing Wordpress

Installing Wordpress is easy. Just start WebPI and click Wordpress. For a little more handholding refer to Richard Marr's blog.

image

Simple, wasn't it?

No Comments