Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

All rpms for postfix is built for MySQL 5.0, however I have MySQL 5.1 installed on my server, how do I proceed installing postfix for MySQL 5.1 with the MySQL support?

share|improve this question
postfix build with the mysql 5.0 libs should be able to talk to a mysql 5.1 server – topdog Jul 17 '10 at 11:36
up vote 0 down vote accepted

The existing one in CentosPlus repository should work, it's dependency is on:

However if it doesn't work, then grab the source existing RPM:

Make sure the following are installed on your system ("yum install FOO" as root) as well as the "rpm-build" package :

$ cat postfix.spec | grep BuildRequires
BuildRequires: gawk, perl, sed, ed, db4-devel, pkgconfig, zlib-devel
BuildRequires: setup >= 2.5.36-1
BuildRequires: openldap >= 2.0.27, openldap-devel >= 2.0.27
BuildRequires: cyrus-sasl >= 2.1.10, cyrus-sasl-devel >= 2.1.10
BuildRequires: pcre, pcre-devel
BuildRequires: mysql, mysql-devel
BuildRequires: postgresql, postgresql-libs, postgresql-devel
BuildRequires: openssl-devel >= 0.9.6

Run these commands as your normal user to set up basic RPM building:

cd ~/
mkdir -p redhat/RPMS/{athlon,i386,i486,i586,i668,x86_64,noarch}
echo -e "%_topdir $HOME/redhat\n%packager root <root@localhost>" > ~/.rpmmacros

Place your downloaded SRPM from above into ~/redhat/SRPMS/, then:

rpmbuild -ba postfix-2.3.3-2.1.centos.mysql_pgsql.src.rpm create a compatible package for the MySQL 5.1 RPMs you have installed that you know is built against them.

share|improve this answer
Thanks for your comprehensive answer :) – TheOnly92 Jul 17 '10 at 18:15

There's no need to rebuild Postfix. Just install the Mysql 5.1 shared-compat package of the same version of your Mysql 5.1 server. That'll provide the libmysql Centos 5.x expects.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.