MariaDB 5.5 / Cent OS 6.4

meddev wrote on Friday, September 20, 2013:

We have installed OpenEMR 4.1.1 and 4.1.2 at four sites and on a couple of development servers using MariaDB 5.3.3 and everything seems to be working fine. Some have been running for a few weeks.Getting MariaDB installed on CentOS 6.4 was a little tricky and if there is any interest I’ll post the steps.

We typically install lighttpd or nginx rather than apache and both are fine.

zhhealthcare wrote on Friday, September 20, 2013:

Of course, there is interest. Please share.

jcahn2 wrote on Friday, September 20, 2013:

Looks like excellent fodder for a wiki page.

meddev wrote on Friday, September 20, 2013:

Just finished typing it up, here are the steps:

Install centOS 6.4 as usual (I usually install from a liveUSB)

If you omit this step you may end up in dependency hell!!

rpm -qa ‘mysql*’ ! to list any existing mysql packages
rpm -e --nodeps mysql-libs to remove any existing mysql packages

Install MariaDB, lighttpd and PHP

Setup the MariaDB repo:

add the following to /etc/yum.repo.d/mariaDB.repo:
# MariaDB 5.5 CentOS repository list - created 2013-08-02 21:56 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Use yum to install the packages:

yum install MariaDB MariaDB-client
yum install lighttpd
yum install lighttpd-fastcgi
yum install php
yum install php-mysql
yum install php-fpm

    ... config mysqld as needed

    chkconfig --level 2345 mysql on
    service mysql start

Install lightty using RPMForge repo

    wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
    rpm -Uhv rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
    yum install lighttpd

    ...config lighttpd as needed (/etc/lighttpd/lighttpd.conf)

    chkconfig --level 2345 lighttpd on
    service lighttpd start

Omit the steps for lighttpd if you prefer Apache

yehster wrote on Friday, September 20, 2013:

Similar steps are available for other distributions

Here are the commands to run to add MariaDB to your Ubuntu system:
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
sudo add-apt-repository ‘deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu raring main’
Once the key is imported and the repository added you can install MariaDB with:
sudo apt-get update
sudo apt-get install mariadb-server
See Installing MariaDB .deb Files for more information.

I used the window installers to setup MariaDB on windows.

My experience is that MariaDB does work as a “drop in” replacement for MySQL.

I’m not sure these instructions are something that should go on OpenEMR’s wiki though. It’s not something that’s specific to OpenEMR. I worry about the issue of keeping such a wiki entry up to date if MariaDB changes things.

meddev wrote on Friday, September 20, 2013:

I tend to agree with you Kevin. Maybe the fact that MariaDB has been tested and is running in production should be added someplace. I have not taken the time to investigate adding to the wiki or I would do it.

meddev wrote on Friday, September 20, 2013:

Want to also add that one of the installs has over 240,000 encounters that we converted from the previous EMR software. System performance thus far has not been an issue at all except during the initial conversion. We did not think it would be but being an unknown (to us anyway) we did not know what to expect. We have other mysql/mariaDB installs running non-OpenEMR software with several million rows in charge and payment transaction tables and have not seen any issues so we were fairly confident OpenEMR would perform in a similar manner. Anyway if anyone else is contemplating large numbers of encounters performance should be fine with the right server setup.

fsgl wrote on Friday, September 20, 2013:

Hi MedDev,

Thanks for posting. Another user has had a very difficult time upgrading to 4.1.2 with MariaDB 5.5.32.

If you are pressed for time; when appropriate, this small primer is a quick read.

Hope the Eye forms are working out for you. I added another which requires very little typing.

tmccormi wrote on Saturday, September 21, 2013:

This is the easiest method I found for MariaDB on Ubuntu 12.10
http://blog.justin.kelly.org.au/migrate-mysql-to-mariadb-in-ubuntu-12-dot-10/
–Tony

meddev wrote on Monday, September 23, 2013:

fsgl: all of the problems that we encountered with MariaDB were getting it installed. Once installed there seems to be no issues with OpenEMR at this point. Thanks for the info on the wiki… when time permits I’ll take a look. The user we had in mind for the eye forms is still looking for the perfect EMR :slight_smile: