8 Answers
8

For older releases like 12.10:

(This release is End of Lifed, consider upgrading!)

I have prepared PPA with MySQL 5.6 packages based on MySQL 5.5 Debian packages. No guarantee that it will work right away, but I would be grateful if you can try it and report back success (or failure).

There are PPAs for MySQL 5.5 and MySQL 5.6, both with latest upstream source.

I wonder why the -1? Are those packages non-functional, or there's some other reason?
–
oerdnjJun 25 '13 at 7:24

Thanks for the effort! Why is it "experimental"? Will you be maintaining it with future versions/bugfixes? Do you have a (or know of a trustworthy) PPA for PHP 5.5 for 12.04 too?
–
DexterJul 30 '13 at 13:44

1

@Dexter It's experimental, because it needs testing. I already maintain php5.5 repository in php5-experimental PPA (soon to be moved to php5 PPA).
–
oerdnjJul 30 '13 at 13:48

1

@Dexter JFTR I have now merged the two MySQL PPAs into the one. The ppa:ondrej/php5 has been updates with PHP 5.5 as well and PHP 5.4 can be found in ppa:ondrej/php5-oldstable.
–
oerdnjJul 30 '13 at 14:40

Stephan, thanks for your help! Unfortunately, I already tried that. It installed ok, but it installed in /opt, and didn't set up anything in /etc, or /etc/init.d, or let me start it with service, or add /opt/mysql/server-5.6/bin to the path, or anything else.
–
Ross Smith IIOct 20 '12 at 4:50

@Ross, try installing MySQL 5.5 first, using apt-get and then install the .deb file over it.
–
Old ProOct 24 '12 at 4:41

@OldPro: I don't think that will work, as 5.5 will install in /etc, /usr/bin, etc, and 5.6 will install in opt.
–
Ross Smith IIOct 24 '12 at 15:20

Well so they install in /opt ... Since "the Debian way" is actually just about being a lazy administrator I would live with it and adjust the startup files in /etc/init.d accordingly. Maybe there are even some ready to symlink startup files in /opt.
–
Paul HänschOct 27 '12 at 22:25

Thanks Eric, a couple things: your comment link is broken on that page also if you need to use the mysql client5.5 with the mysql server 5.6 you need to link the my.cnf to /etc/mysql/my.cnf from /etc/my.cnf
–
JD SchmidtJan 16 '14 at 6:08

You can of course install everything required for Mysql-5.5 from the repositories in both 12.04 and 12.10, but the following should help you get Mysql-5.6 installed.

Firstly, I should try installing the deb file from the official site in Software Centre or Gdebi, as those programs resolve dependencies, dpkg doesn't.

Compiling mysql is your next option:

Note: Doing it the 'Debian way' (as you mention) will only get you mysql-5.5 and not 5.6: i.e.

sudo apt-get source mysql-5.5

as there isn't any other source available by default. If you want to use the latest development code you have to download it from the official site, which is better than trying to enable some unstable repository or another.

There are also no ppas available at the present time (other than the one you have tried), so the following way of compiling mysql-5.6 is actually the easiest and only way at the minute of getting what you want.

However, as you say you are interested in compiling the latest development version of mysql 5.6, the following instructions should help you:

Download the latest development source code from the mysql site and verify the download. At the present time you want mysql-5.6.7-rc.tar.gz; go down the page, select development releases and then select source code in the box.

Now, run

tar xzvf mysql-5.6.7-rc.tar.gz

cd to the folder and create a folder called bld:

cd mysql-5.6.7-rc
mkdir bld
cd bld

At this point it is important to fetch the dependencies with

sudo apt-get install build-essential cmake libaio-dev

Important documentation is available here on the build process, but what you probably want to do is just use the standard options that the official build uses. For that, as noted here, please run (while in the bld folder):

cmake -DBUILD_CONFIG=mysql_release ..

Then when the cmake configure has finished and is satisfied (take note of any missing dependencies it mentions; if there are any missing ones download them and then delete everything in the bld directory and run the above cmake command again)

Now you are ready to run the compile with make and any options that you may add:

make

When the compile has finished (it will take about an hour), run either

sudo make install or sudo checkinstall

Now, you should have a mysql installation. Any further information should be available in the very detailed official guide.

Mik, I really appreciate your answer, but I'm looking for how to do it using the standard Debian method. But thanks!
–
Ross Smith IIOct 23 '12 at 21:27

@RossSmithII see my edit re how doing it the 'Debian way' won't get you the latest version of mysql-5.6.
–
user76204Oct 23 '12 at 22:45

1

Your answer, while very helpful, and informative, does not truly answer the question, as installing from source, the "Debian Way", uses apt-get source -b or dpkg-buildpackage.
–
Ross Smith IIOct 24 '12 at 16:12

This answer is a duplicate of askubuntu.com/a/203335/98419, and my response was: ... I already tried that. It installed ok, but it installed in /opt, and didn't set up anything in /etc, or /etc/init.d, or let me start it with service, or add /opt/mysql/server-5.6/bin to the path, or anything else.
–
Ross Smith IIOct 31 '12 at 20:10

Thanks for your follow up. Unfortunately, I'm not asking how to install MySQL 5.6 by hand. This has been documented in numerous places. I'm asking how to install MySQL 5.6 using the standard Debian methods, either the binaries (preferred) or via source.
–
Ross Smith IINov 2 '12 at 21:58

Here is another approach compared to empi89 's answer, using a modified mysql init script. Yes this is manual, but this is the price you pay to be on the bleeding edge. Oracle does not provide a repository.
Have a look at this post.

EDIT: In brief, you can copy the original /etc/init.d/mysql to /etc/init.d/mysql-opt and modify it as appropriate:

Replace /etc/mysql/my.cnf with /etc/mysql/my-opt.cnf

Replace calls to mysql binaries with the opt ones (e.g. /usr/bin/mysqld_safe to /opt/mysql/server-5.6/bin/mysqld_safe)

Replace the call to /etc/mysql/debian-start with /etc/mysql/debian-start-opt

Then, copy /etc/mysql/debian-start to /etc/mysql/debian-start-opt and edit as appropriate:

Replace calls to mysql binaries with the opt ones (e.g. /usr/bin/mysqld_safe to /opt/mysql/server-5.6/bin/mysqld_safe)

Thank you for this link, but it unfortunately, these instruction are for installing the binary manually. the question is how to install mysql using the standard Debian methods, such as apt-get.
–
Ross Smith IIFeb 11 '13 at 20:37