Install MariaDB on RedHat 5.4

May 4, 2010

Is MariaDB really a drop in replacement for MySQL?   I’m running CentOS 5.4.  What happens if…

  1. Use “mysqldump –all-databases > FullBackup.sql” to make a full backup. (Better safe then sorry)
  2. Go to and download the CentOS 5 packages.
  3. Stop msql “service mysqld stop”
  4. Pull MySQL out by the roots with “rpm -e mysql-server mysql –nodeps”
  5. Install Maria with “rpm -i Maria-*”

And the install start mysql up again.  Wow.  That’s “Drop in”.

If your reading this, you’re seeing it works.

Next day. - When you remove the older MySQL, RPM renames /etc/my.cnf to my.cnf.rpmsave.  Thus, when MySQL starts it is running with default settings.  Also, MariaDB changes the startup script to ‘mysql’  from the older mysqld.   When I put my.cnf back in place and restarted MySQL it didn’t run. I found the error in /var/log/mysqld.log.  I needed to remove the options ‘skip-bdb’.  I restarted MySQL again and is working.

  1. mv /etc/my.cnf.rpmsave /etc/my.cnf
  2. vi /etc/my.cnf  (removed the option skip-bdb)
  3. service mysql restart

Your options may very.

The log also tells me about deprecated options I was using.  So I cleaned them up.

UPDATE – 5/25/2010, 5/26/2010

I have run into one upset.  Although says “Percona XtraDB 1.0.6-9 is included in MariaDB 5.1.42 and 5.1.44.”,  the copy I downloaded did not include it gave me some trouble.  This broke my website badly.  XtraDB is a drop in replacement of InnoDB (same table formats, no need to convert any data).

I have learned that a bad my.cnf setting (innodb_log_file_size = 256M) make the XtraDB  (InnoDB) drop and not even report in the SHOW ENGINES command.

UPDATE 6/2/2010

I have reported this as a bug. #588849 I did find stopping the server, deleting all the ib_logfile* files and restarting the server fixed this.  I still consider it a bug because I could not find any message about this in the logs.

Mark Grennan


tags: , , , ,
posted in Commentary by mark

Follow comments via the RSS Feed | Leave a comment | Trackback URL

4 Comments to "Install MariaDB on RedHat 5.4"

  1. Colin Charles wrote:


    Good work on trying it out. And good that its currently running your blog as well :)

    Glad that its drop in enough for you, and very nice blog. Shoot me an email sometime – couldn’t find any contact details on this site…


  2. Log Buffer #188, a Carnival of the Vanities for DBAs | The Pythian Blog wrote:

    [...] Starting off this week’s issue is a request from Mark Grennan a DBA who would like to let the community know about his blog MySQL Fan Boy, where he wrote an interesting post on including a script to replace MySQL table files on a live system, making it faster and limiting locking on large table loads. Also a post this week on whether MarieDB is a drop in replacement for MySQL. [...]

  3. Monty wrote:

    Nice blog!

    Thanks for communication how things are working for you!

    I am documenting some of the issues you have in to ensure that others should have an easier time to find a solution for similar problems.

    What was the issue with innodb_log_file_size=256M. I tested this with a fresh MariaDB install and had no problems with it.

    The only problem I know about is that the value must be the same as was used for any old log files that you may have.

    Keep up the good work!


  4. mark wrote:

    “The only problem I know about is that the value must be the same as was used for any old log files that you may have.”

    This is exactly right and it is simple to fix. It’s not so much a technical issue as a user issue. MySQL doesn’t tell you, loudly enough, that it has a InnoDB problem and is not starting the engine. I’ts is good that it starts the server but it should announce X ENGINE NOT STARTED!

Leave Your Comment


Powered by Wordpress and MySQL. Theme by Shlomi Noach,
Creative Commons License
MySQL Fan Boy by Mark Grennan is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.