Install MySql 5.6 on Ubuntu 16.04
I used the following approach:
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe'
sudo apt-get update
sudo apt install mysql-server-5.6 mysql-client-5.6
If an error occurs during the execution of the last command take a look at the comment section of this answer.
Looks that I managed to do it.
-
In Software & Updates/Other Software added 14.04 repository:
deb http://archive.ubuntu.com/ubuntu trusty main
-
Installed mysql client and server:
sudo apt install mysql-server-5.6 sudo apt install mysql-client-5.6
Update: Before installing 5.6, make sure that no other mysql packages are present:
dpkg -l | grep mysql
- returns list of mysql packages.
Use apt-get purge <package name>
to purge them.
Source: 16.04 upgrade broke mysql-server
I was facing same issue and I have performed simple steps below:
sudo apt-get install software-properties-common
$ sudo add-apt-repository -y ppa:ondrej/mysql-5.6
$ sudo apt-get update
$ sudo apt-get install mysql-server-5.6
Solution worked for me Cheers!!
dpkg --force-depends -P `dpkg -l |awk '/mysql/{print $2}'`
rm -r /etc/mysql/
apt-get install mysql-server mysql-client
The MySQL developers provide Xenial packages of MySQL 5.6 in their own repositories, and this should thus be preferred over installing the official Ubuntu Trusty packages, since it is in general better to install packages which were created for your version of Ubuntu.
If you already have MySQL Server packages, you should first uninstall them; just uninstall everything that is shown by dpkg -l | grep mysql-server
.
Just download and install the mysql-apt-config
DEB package in the previous link. During the installation, it will ask which version you want, so you can choose 5.6. After the package is done installing, sudo apt update && sudo apt install mysql-server-5.6
will install MySQL Server 5.6.