Can't install mysql-server/client on ubuntu 16

- Posted in Linux by

We execute the following commands to solve the above problem:

Get the list of MySQL packages installed on the system by executing the command sudo dpkg -l | grep mysql
Remove the the packages shown above by executing the command sudo apt-get --purge autoremove <packages from the step 1>
Delete /var/lib/mysql
Try to install mysql again. It should solve your problem.