5

I'm trying to install MySQL 5.6 in Raspbian 7 (wheezy).

I've added the repo:

wget http://dev.mysql.com/get/mysql-apt-config_0.3.7-1debian7_all.deb
sudo dpkg -i mysql-apt-config_0.3.7-1debian7_all.deb 
sudo apt-get update

When I type in sudo apt-get install mysql-server-5.6:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mysql-server-5.6
E: Couldn't find any package by regex 'mysql-server-5.6'

Only mysql-server-5.1 & mysql-server-5.5 are available.

Where have I gone wrong?

1
  • did you run sudo apt-get update after adding the repo? Are you sure that 5.6 is available in the wheezy repos or do you need jessie? Commented Oct 15, 2015 at 22:09

2 Answers 2

5

Checking on Raspbian 8 (jessie):

> apt-cache search mysql-server
mysql-server - MySQL database server (metapackage depending on the latest version)
mysql-server-5.1 - MySQL database server binaries and system database setup
mysql-server-5.5 - MySQL database server binaries and system database setup
mysql-server-core-5.1 - MySQL database server binaries
mysql-server-core-5.5 - MySQL database server binaries

This is the same as wheezy (actually that's an upgraded to jessie system; if you have a new from scratch jessie 5.1 will not be there). So in fact 5.6 is not available. Note that Raspbian binaries are compiled for the ARMv6 platform -- you cannot use just any Debian package. The current Raspbian (jessie) is parallel to the current Debian anyway.

But

5.6 is available for "stretch", the current Debian testing branch, and as Peter Green notes in a comment, it has at least been built for Raspbian.

Along the lines of the methodology described here, you can try and install a stretch package on a jessie system. I.e., add:

deb http://archive.raspbian.org/raspbian/ stretch main

To /etc/apt/sources.list. Then run apt-get update. Finally:

apt-get install mysql-server-5.6

This requires various stretch dependencies and a few upgrades but is worth trying.


It also is in theory possible to upgrade the whole system now (from jessie) if you change jessie to stretch in /etc/apt/sources.list, run apt-get update and then (this is the edge of the cliff...) apt-get dist-upgrade (which will probably take some time), but beware this has probably not been tested much by the masses yet.


If you have a Pi 2, 5.6 is available for pure ARMv7 distros -- primarily Ubuntu (it is probably an alternative in 14.04 LTS). The default on Fedora 21 ARM is 5.6.26.

6
  • "although I notice 5.6 is available for "stretch", the Debian testing branch, but Raspbian is behind with that" according to buildd.raspbian.org/status/… our autobuilders built mysql 5.6 for raspbian stretch nearly a month ago. Commented Oct 16, 2015 at 13:14
  • @PeterGreen Good call; I've edited that in, but I don't know how anyone could actually get this -- do you have any idea? If I add "testing", "staging", or "unstable" to a sources.list with "jessie", apt-get update then just says it cannot find an "entry...in Release File". Also, it very possibly will depend on a stretch libc, at which point it becomes inviable (or at least, really really inadvisable -- switching distros is a better option if that is the case).
    – goldilocks
    Commented Oct 16, 2015 at 13:38
  • More or less the same thing is true for sid -- it hasn't been incorporated into the Raspbian repos. While the libc version is probably not an issue, the Debian armhf binaries are ARMv7 like Ubuntu. You could try compiling it from the source package or upstream.
    – goldilocks
    Commented Oct 16, 2015 at 13:59
  • " If I add "testing", "staging", or "unstable" to a sources.list with "jessie", apt-get update then just says it cannot find an "entry...in Release File"." <-- I'm guessing you don't understand the format of sources.list but I would agree installing strech packages on a wheezy system isn't sensible. The most sensible option if you really need 5.6 is probablly to build from source. or upgrade to stretch but that is likely to open a can of worms of it's own. Commented Oct 16, 2015 at 14:12
  • @PeterGreen No, I'm not a big apt user -- based on your clue I replaced jessie with stretch (since sid failed) and that worked, then apt-cache has 5.6. I agree upgrading right now is a gamble, but I've edited in an explanation of how to do it (I think I've got that correct). I may try it when I get a chance just to see what happens.
    – goldilocks
    Commented Oct 16, 2015 at 14:27
2

It appears that the repository in question only supports i386 and amd64.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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