This is part of a write-up of an attempt to use Linux as a "Small Business Server", and describes workaround for a simple mySQL database server.setup.
Suppose you're default Debian release is stable, because for most of your system you prefer the proven stability this branch offers. On the other hand, sometimes you need newer packages because the older ones do nut support the features you need or want.
In this case, we want a newer mysql package (from testing), because it is recommended for the mediaWiki we want to set up.
simply pinning mysql-server to 'testing'results in unresolved dependencies, so that won't work. Here's a workaround. At the time of writing, the desired version (mysql 5.0) is in 'testing'.
#modify /etc/apt/preferences #pin all of the following packages to "testing*" mysql-server mysql-client mysql-common libncurses5 libreadline5 #install in the given order : apt-get install mysql-common apt-get install mysql-client-5.0 apt-get install mysql-server-5.0 #apt-get install mysql-server mysql-client # remove pins so that upgrades occur as soon as 'stable' # versions catch up with mysql 5.0 ?
If you're default release is 'testing', all dependencies for mysql 5.0 are met automatically, so that's an alternative if you can't get stable + selected packages from testing to work.
You can switch to 'testing' by writing APT::Default-Release "testing"; in /etc/apt/apt.conf and run aptget-update && apt-get upgrade. You can even switch back to 'stable' afterwards. Your system will then (I assume) be upgraded by packages from stable as soon as their version is higher than the (testing) packages you have installed. You may run into unresolved dependencies in the process, which you might be able to workaround by means of pinning.