cannot install mysql-server in ubuntu16.0.4

I solved this problem by removing mariadb's deb sources and purging mysql-common and then reinstalling it.

do: sudo apt edit-sources and look for anything containing mariadb like: deb [arch=amd64,arm64,ppc64el] http://ftp.nluug.nl/db/mariadb/repo/10.3/ubuntu bionic main

comment it out by putting a # in front of it. then run

sudo apt update
sudo apt purge mysql-common
sudo apt install mysql-common

after that you can install mysql-server properly via sudo apt install mysql-server

if it ever dissapears from the repo the script was:

#!/bin/sh
set -e

case "$1" in
  install)
    variant="$2"
    my_cnf_path="$3"
    update-alternatives --install /etc/mysql/my.cnf my.cnf "$my_cnf_path" 200
  ;;
  remove)
    variant="$2"
    my_cnf_path="$3"
    update-alternatives --remove my.cnf "$my_cnf_path"
  ;;
esac
```

Just purge all mysql packages and reinstall:

sudo apt-get remove --purge *mysql*
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mysql-server mysql_secure_installation

I fixed the problem by adding a blank file that the install script was looking for and then giving rwx permissions for everyone. Probably not the best way but it worked for me.

    sudo touch /usr/share/mysql-common/configure-symlinks
    sudo chmod 777 /usr/share/mysql-common/configure-symlinks
    sudo apt-get update
    sudo apt-get upgrade