Debian Etch: Replication problems with default MySQL Package

Debian Etch (the current stable distribution) is bundled with MySQL 5.0.32. While it works, there is a problem with replcating that data to other MySQL servers. This is fine for most users, however, I’ve built in a highly fault-tolerant enterprise.

As you’ll find, MySQL prior to 5.0.38 has a nasty problem: it will most likely mangle any AUTO_INCREMENT field’s value.

This is bad. People who write for MySQL use this almost extensively for an index key, and many rely on these numbers for sub-indexes. Something as simple as a ‘comment on this page’ form can be broken.

Fret not, though, for we can make our life easier (for now) by utilizing the 5.0.38 source package available within Sid’s repository, however, keep in mind that you should audit this to ensure it will work properly for you, as it has not completed regression tests:

First, make sure we’ve got adequate support software, libraries and headers to build our software (the below is somewhat cheating, but there are currently no major library changes required between Etch, and Sid):

# apt-get build-dep mysql-server wget dpkg-source
# wget http://ftp.debian.org/debian/pool/main/m/\
  mysql-dfsg-5.0/mysql-dfsg-5.0_5.0.38-3.dsc
# dpkg-source -x mysql-dfsg-5.0_5.0.38-3.dsc
# cd mysql-dfsg-5.0_5.0.38
# (fakeroot) debian/rules binary

You may now install the built binary packages.