I tried to install with these inscturctions, but installation installed version 5.5.

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository -y ppa:ondrej/mysql-5.7
$ sudo apt-get update
$ sudo apt-get install mysql-server



The PPA repository does not contain any packages for mysql 5.7: There are no deb files. Just take a look with your browser:

And on the status page it actually says:

 mysql-5.7 38 weeks ago
 Failed to build: amd64 i386 

So at least for this ppa you are out of luck ;-(

Therefore I also suggest also using the original source at mysql/Oracle:

  • See Mohit's answer for the short version.
  • For the long version: https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/
  • Note that there is a more recent version of the config deb. Install that one: dpkg -i mysql-apt-config_0.6.0-1_all.deb
  • The site might ask you to sign on or register. It's Oracle after all...

Then the this version should show up (5.7 is GA since 5.7.9 so 5.7.10 should be fine):

apt-cache show mysql-server=5.7.10-1ubuntu14.04

If it does install via:

apt-get install mysql-server=5.7.10-1ubuntu14.04

Note that you might have to clean up other dependent packages beforehand.

| improve this answer | |
  • It worked, however I had to call apt-get update before it recognized that package. – newbie Jan 28 '16 at 5:38
  • 1
    This is outdated: Oracle offers a deb package for installing MySQL 5.7 and keeing it up o date. – reinierpost Apr 13 '16 at 12:39

First visit https://dev.mysql.com/downloads/repo/apt/ to find the most recent version of the package. The below version will be out of date by the time you read this.

Please run below command:

wget http://dev.mysql.com/get/$package
sudo dpkg -i $package
sudo apt-get update
sudo apt-get install mysql-server

Originally you needed to install mysql-server-5.7 but with the more recent package, it is just mysql-server

| improve this answer | |
  • 1
    This installs 5.7.8-rc, how can I install GA version ? – newbie Jan 27 '16 at 11:27
  • This should be marked as the correct answer! – Maria Ines Parnisari Sep 3 '16 at 20:13
  • probably need to run mysql_upgrade --force after you do this. I did when I realized mysqldump was broken and that got it working again. – billynoah Oct 4 '16 at 10:49
  • This now gives W: GPG error: http://repo.mysql.com trusty InRelease: The following signatures were invalid: KEYEXPIRED 1487236823 KEYEXPIRED 1487236823 KEYEXPIRED 1487236823 when running apt-get update. – stefansundin Aug 3 '17 at 17:08

Use mohit's answer, but refer to https://dev.mysql.com/downloads/repo/apt/ for the current mysql-apt-config. Click "Download" at the bottom. Then copy the link from "No thanks, just start my download." at the bottom

| improve this answer | |
  • This might be better as a comment to Mohit's answer – Dave M May 20 '16 at 14:28
  • sudo apt-get install mysql-server instead of mysql-server-5.7 when using the above instructions. Awesome Phil! – Software Prophets Apr 17 '18 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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