I'm using the Turnkey Linux virtual machine. The version of Debian in there is apparently on the "Wheezy" upgrade path (if that's what you call it). I'm not completely comfortable with Linux, as you can see.
I need some new features that MySQL 5.6 offers, while my current installation is MySQL 5.5.35. I'd like to get the latest version (5.6.17 as of this posting) or at least any 5.6.x.
I've tried apt-get update
, apt-get upgrade
, apt-get dist-upgrade
. These updated a bunch of things successfully, but none were MySQL. I tried apt-get upgrade mysql-server
, which says I already have the latest version.
A Debian Wheezy package repository list on the web shows MySQL 5.5 and nothing else, when I need 5.6. I then read something about "backports", which sounds like it might be able to get me things that my particular Debian isn't supposed to have yet — but I can't seem to get it working. It requires adding lines to /etc/apt/sources.list.d/sources.list
. When I try doing that, then running apt-get update
, I get 404 errors.
I've tried several other routes as well, one being compiling the vanilla MySQL download, which I failed at miserably and would rather not try again.
I'm positively baffled at how this is done. Most of the URLs listed on forums/blogs for apt-get
, and even for wget
, seem to die soon after they're posted, so I can't understand how anyone even goes about finding the right information. I've been trying to do this for two days straight now and can't get anywhere.
So assuming you've read this far, I would love to know if anyone has any way of upgrading MySQL in Debian in some relatively painless automated way (one where I wouldn't have to use make
or export/import my current databases and configs manually).
Best Answer
Rebuilding the experimental 5.6 MySQL sources from experimental on wheezy is easy bordering on trivial. However, you will need lots of disk space; after the build was completed, the build directory was using 5.2 GB. Also, it takes a while to build, and runs an incredible number of tests. I didn't bother to time it, but allow a couple of hours. It is possible to disable the tests, but I suggest letting them run - it is harmless as long as they pass. They did on my machine. The good news is that I was able to build and install it without fuss. I ran the following basic test.
So, I can connect to the server at least. Here is what the packages look like installed:
Here is a breakdown of the steps.
First, get the sources. You need to add the following (or similar, adjust for your preferred server) to
/etc/apt/sources.list
:Also add the following to
/etc/apt/preferences
.Then run
Then run
in some suitable directory. I usually create a directory in
/usr/local/src
,in this case, say
/usr/local/src/mysql
.Then cd into
/usr/local/src/mysql
.Run
On my machine this installed a couple of packages.
Install some basic packages for building.
Then cd into the resulting source directory
/usr/local/src/mysql/mysql-5.6- 5.6.16
and runThis will take a while to build. In some cases it is a good idea to increment
the version number, but it is not really necessary here. as it is unlikely any other MySQL 5.6 package will make its way into wheezy.
If you don't want to run the tests, you can instead use
Now you should install libdbd-mysql-perl, which is a runtime dependency of the mysql packages.
Then cd up one level to
/usr/local/src/mysql
. There should be some deb packages there. You'll want to install at leastThis can be done for example by running: