#103 Official support for MariaDB

Database (7)


I've been seriously questioning my continued use of MySQL ever since Oracle bought Sun, and even more so recently. I'd really like to switch to MariaDB (seems to be the best one of the forks, and the closest to a drop-in replacement)... however, since postfixadmin is my main use of mysql, I'd rather not do this unless/until postfixadmin offically adds support for it.

Are there any existing plans/efforts to do this? From what I've read about MariaDB, it is virtually a drop in replacement for MySQL, so I was hoping it wouldn't be too difficult to add official support for it, then maybe after a certain period, just drop official support for MySQL - unless of course the devs are ok with maintaining them both until such time as they diverge to the point that maintaining them both becomes too much work.

Regardless, many thanks to all who make postfixadmin the best way to maintain a mail server!


  • Alexander

    Alexander - 2012-03-04

    I don't think that need to be done something with postfixadmin to be able to work with MariaDB. It's practically drop in replacement. Nothing should be changed in PHP scripts.
    PostfixAdmins table is pretty simple and don't use anything special(triggers, procedure...) as far as I know.
    We already replaced a few DB servers to MariaDB without any issues and get better performance with it.
    Here is an information about compatibility:

    BTW, It would be good to switch to PDO in PHP instead of direct call of mysql's functions.
    In this case it will be possible to use different Database engines without touching actual logic.

  • Christian Boltz

    Christian Boltz - 2012-04-09

    AFAIK MariaDB should just work (even if you will still have to use 'mysql' or 'mysqli' and not 'mariadb' in $CONF[database_type] ;-)

    If something doesn't work with MariaDB, please open a bugreport. If I don't see any bugreport, then we can consider MariaDB as officially supported ;-))

    @alex-j: using $database_abstraction_of_the_day is a topic that comes up regularly, and I have written several quite long mails to the postfixadmin-devel mailinglist where I explained why I don't like the idea. Basically there are two reasons:

    a) I don't see a real advantage over the db_* functions we have - especially with the *Handler classes in SVN trunk, we already have a quite good abstraction.

    b) some special cases most probably won't work with the same queries in $database_abstraction. For example, take the page browser, which is broken for postgresql in trunk - and uses a very interesting[tm] query for MySQL. I doubt any abstraction layer could convert this query to something that also works with postgresql and is still fast. (The query in 2.3.x works with all databases, but is damm slow - we received reports that loading list-virtual can take minutes.)

  • Christian Boltz

    Christian Boltz - 2012-04-09
    • status: open --> closed-works-for-me
  • Charles

    Charles - 2012-04-10

    Ok, I'll be rolling out a new server (virtualized) in the next few weeks (or 2-3 months at the most), and will report back...

    I'd still like to see the comments in the config files properly reflect this all of this though - meaning, the fact that MariaDB should 'just work', but the DB type still needs to be defined as mysql or mysqli...

  • Charles

    Charles - 2012-04-10
    • status: closed-works-for-me --> open-works-for-me
  • Christian Boltz

    Christian Boltz - 2015-09-07
    • status: open-works-for-me --> closed-works-for-me
    • Group: --> SVN (please specify revision!)
  • Christian Boltz

    Christian Boltz - 2015-09-07

    'mysql' and 'mysqli' are the PHP module names - and they also work with MariaDB.

    I just (SVN r1796) changed the 'mysqli' description so that it also includes MariaDB.

  • Charles

    Charles - 2015-09-10

    Thanks Christian!

    Question: do you or anyone else perform any actual testing with MAriaDB (or MySQL, or Postgres for that matter) for new releases?

    I'm curious what, if any formal testing is done to make sure that new releases work properly on supported versions of the supported databases.

    Thanks again!

  • GingerDog

    GingerDog - 2015-09-10

    ( I run PostfixAdmin with a PostgreSQL backend, and occassionally test it ... )

  • Christian Boltz

    Christian Boltz - 2015-09-10

    I'm using MySQL on my development system (for historical reasons), but I'm also running PostfixAdmin on servers with MariaDB.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks