I had the same issue on VM with Ubuntu 14.04. The only thing worked for me is similar to what Richard Uijen has suggested:
sudo apt-get --purge remove mysql*
sudo apt-get autoremove mysql*
sudo rm -rf /etc/mysql/
sudo rm -rf /var/lib/mysql/
sudo apt-get clean
sudo apt-get update
sudo apt-get install --reinstall mysql-client-5.6
Basically you need to remove all mysql packages (mysql*), clean and install again
After that I could install php7 mysql client without any issues
sudo apt-get install libapache2-mod-php7.0 php7.0-mysql
I was able to solve it. First I had to download all the packages on the link I mentionded Ubuntu Secure Proposed team
I did it using the following commands:
sudo wget https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+build/5935007/+files/openjdk-7-jre_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo wget https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+build/5935007/+files/openjdk-7-jre-zero_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo wget https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+build/5935007/+files/openjdk-7-jre-headless_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo wget https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+build/5935007/+files/openjdk-7-jdk_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
Then I tried to install all of then manually on this order:
sudo dpkg -i openjdk-7-jre-zero_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo dpkg -i openjdk-7-jre-headless_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo dpkg -i openjdk-7-jre_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
sudo dpkg -i openjdk-7-jdk_7u55-2.4.7-1ubuntu1~0.12.04.2_amd64.deb
All of above commands will result in dependencies errors, I just ignore then all and run the following command:
sudo apt-get -f install
Everything got installed and it is working fine. It seems that the apt-get -f install
command try to solve previous dependencies errors by itself installing all needed dependencies (not sure though, as I'm not an specialist).
If someone think that this is not the right procedure, please let me know.
Best Answer
Download desired MySql generic binaries for your platform from http://dev.mysql.com/downloads/mysql/ Then just install using simple linux script(run from /share directory where setup binaries are placed ) , refer below for a script i used for years , worked for 5.1,5.5,5.6
Note : 1.MySql 5.6 does not come with default 'my.cnf' therefore be careful 2. Make sure you uninstall any exiting MySql setup
e.g